diff --git a/package.json b/package.json index 2a5f3f2c1..1e9294a32 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,6 @@ "rollup-plugin-uglify": "6.0.4", "standard-version": "8.0.2", "ts-jest": "26.1.3", - "tslib": "2.0.0", "typescript": "3.9.7" }, "dependencies": { diff --git a/rollup.config.js b/rollup.config.js index f648e6c8f..a3780c75f 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -42,6 +42,24 @@ export default [ file: pkg.main, format: 'cjs', }, + ], + }, + { + input: 'src/index.ts', + external: Object.keys(pkg.dependencies), + plugins: [ + typescript({ + target: 'ES6', + }), + production && + terser({ + output: { + comments: false, + }, + }), + ], + context: 'window', + output: [ { exports: 'named', file: pkg.module, diff --git a/tsconfig.json b/tsconfig.json index e29c916a5..10dd97fd9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,17 +1,17 @@ { "compilerOptions": { "target": "ES5", - "lib": ["DOM", "ESNext"], "module": "ESNext", "moduleResolution": "Node", "declaration": false, "strict": true, "esModuleInterop": true, "noEmitOnError": false, - "allowJs": true, + "allowJs": false, "checkJs": false, "skipLibCheck": false, - "incremental": false + "incremental": false, + "importHelpers": false }, "include": ["./src"] } diff --git a/yarn.lock b/yarn.lock index 592a76af3..0318b88f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9072,11 +9072,6 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.0.tgz#18d13fc2dce04051e20f074cc8387fd8089ce4f3" - integrity sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g== - tslib@^1.8.1, tslib@^1.9.0: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"