Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add: rollup, esbuild and rollup plugins - rollup - @rollup/plugin-typescript - rollup-plugin-dts - rollup-plugin-esbuild - esbuild * update: tsconfig.json Following changes: - update lib and target to es2018 - add esModuleInterop and set to true - add moduleResolution and set to node * add: rollup config file The configuration is designe to build: - declarations - cjs module - esm module * update: package.json exports and scripts Set the correct entrypoint for cjs and esm modules and update build script to perform a typecheck followed by a rollup build * update: typescript 4.4.2 -> 4.8.3 Update typescript to latest version due to an issue that version 4.4.2 has with rollup. For reference here is the issue: [Builds hang with typescript 4.4.2](rollup/plugins#983) * add: sideEffects to package.json Add 'sideEffects: false' to package.json to allow webpack (and possible other bundlers) to threeshake the code * fix: tsconfig target set to 'esnext' Update tsconfig to target 'esnext' instead of 'es2018' * fix: set rollup to preserve module structure Set option 'preserveModules' to 'true' to keep module structure intact instead of combining everything into a single file. This way it should be easier for bundlers to three shake unused code * fix: tsconfig target and lib set to 'es2019' Following the guidelines provided here: https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping, I set tsconfig target and lib to 'es2019' to support node 12 * fix: set package.json exports and use .cjs and .mjs extensions Add exports and specific .cjs and .mjs extensions to make sure node uses the correct module loader Following documentaion on the official nodejs website: https://nodejs.org/api/packages.html#dual-commonjses-module-packages * build: bump rollup to 2.79.1 * build: regenerate yarn.lock
- Loading branch information