diff --git a/docs/tsconfig.js.json b/docs/tsconfig.js.json index d2993d374e8449..e9ce7f5882c285 100644 --- a/docs/tsconfig.js.json +++ b/docs/tsconfig.js.json @@ -6,7 +6,8 @@ "noEmit": true, "strict": true, "baseUrl": ".", - "noImplicitAny": false + "noImplicitAny": false, + "resolveJsonModule": true }, "include": ["./typings.d.ts", "./pages/**/*.jsx"] } diff --git a/lib/package.json b/lib/package.json index f56f7662f505ea..eed065dff896b2 100644 --- a/lib/package.json +++ b/lib/package.json @@ -107,8 +107,8 @@ "rollup-plugin-commonjs": "^9.2.0", "rollup-plugin-node-resolve": "^4.0.1", "rollup-plugin-size-snapshot": "^0.8.0", + "rollup-plugin-terser": "^4.0.4", "rollup-plugin-typescript": "^1.0.0", - "rollup-plugin-uglify": "^6.0.2", "size-limit": "^0.21.1", "ts-jest": "^24.0.1", "ts-lib": "0.0.5", diff --git a/lib/rollup.config.js b/lib/rollup.config.js index a9dc1acce28216..662c41e60a5e4e 100644 --- a/lib/rollup.config.js +++ b/lib/rollup.config.js @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import path from 'path'; +// @ts-ignore import pkg from './package.json'; import typescript from 'typescript'; import babel from 'rollup-plugin-babel'; @@ -7,7 +8,7 @@ import replace from 'rollup-plugin-replace'; import commonjs from 'rollup-plugin-commonjs'; import nodeResolve from 'rollup-plugin-node-resolve'; import typescriptPlugin from 'rollup-plugin-typescript'; -import { uglify } from 'rollup-plugin-uglify'; +import { terser } from 'rollup-plugin-terser'; import { sizeSnapshot } from 'rollup-plugin-size-snapshot'; const tsconfig = path.join(__dirname, 'tsconfig.json'); @@ -131,7 +132,7 @@ export default [ commonjs(commonjsOptions), replace({ 'process.env.NODE_ENV': JSON.stringify('production') }), sizeSnapshot(), - uglify(), + terser(), ], }, ]; diff --git a/yarn.lock b/yarn.lock index 17d346478d0db7..34e31822c77641 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9726,6 +9726,16 @@ rollup-plugin-size-snapshot@^0.8.0: terser "^3.14.1" webpack "^4.28.4" +rollup-plugin-terser@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-4.0.4.tgz#6f661ef284fa7c27963d242601691dc3d23f994e" + integrity sha512-wPANT5XKVJJ8RDUN0+wIr7UPd0lIXBo4UdJ59VmlPCtlFsE20AM+14pe+tk7YunCsWEiuzkDBY3QIkSCjtrPXg== + dependencies: + "@babel/code-frame" "^7.0.0" + jest-worker "^24.0.0" + serialize-javascript "^1.6.1" + terser "^3.14.1" + rollup-plugin-typescript@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/rollup-plugin-typescript/-/rollup-plugin-typescript-1.0.1.tgz#86565033b714c3d1f3aba510aad3dc519f7091e9" @@ -9734,16 +9744,6 @@ rollup-plugin-typescript@^1.0.0: resolve "^1.10.0" rollup-pluginutils "^2.5.0" -rollup-plugin-uglify@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.2.tgz#681042cfdf7ea4e514971946344e1a95bc2772fe" - integrity sha512-qwz2Tryspn5QGtPUowq5oumKSxANKdrnfz7C0jm4lKxvRDsNe/hSGsB9FntUul7UeC4TsZEWKErVgE1qWSO0gw== - dependencies: - "@babel/code-frame" "^7.0.0" - jest-worker "^24.0.0" - serialize-javascript "^1.6.1" - uglify-js "^3.4.9" - rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.0: version "2.4.1" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.4.1.tgz#de43ab54965bbf47843599a7f3adceb723de38db" @@ -10930,14 +10930,6 @@ uglify-js@^3.1.4: commander "~2.20.0" source-map "~0.6.1" -uglify-js@^3.4.9: - version "3.4.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" - integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== - dependencies: - commander "~2.17.1" - source-map "~0.6.1" - unfetch@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.1.0.tgz#6ec2dd0de887e58a4dee83a050ded80ffc4137db"