diff --git a/packages/shared/common/rollup.config.js b/packages/shared/common/rollup.config.js index 4570ad0dc..f1d9321b5 100644 --- a/packages/shared/common/rollup.config.js +++ b/packages/shared/common/rollup.config.js @@ -1,11 +1,14 @@ import common from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; -import resolve from '@rollup/plugin-node-resolve'; -import terser from '@rollup/plugin-terser'; import typescript from '@rollup/plugin-typescript'; import { visualizer } from "rollup-plugin-visualizer"; +// The common library does not have a dependency resolution plugin as it should not have any +// dependencies. + +// This library is not minified as the final SDK package is responsible for minification. + const getSharedConfig = (format, file) => ({ input: 'src/index.ts', // Intermediate modules don't bundle all dependencies. We leave that to leaf-node @@ -38,8 +41,6 @@ export default [ transformMixedEsModules: true, esmExternals: true, }), - // resolve(), - terser(), json(), // The 'sourcemap' option allows using the minified size, not the size before minification. visualizer({ sourcemap: true }), @@ -47,6 +48,6 @@ export default [ }, { ...getSharedConfig('cjs', 'dist/index.cjs.js'), - plugins: [typescript({ tsconfig: './tsconfig.json' }), common(), resolve(), terser(), json()], + plugins: [typescript({ tsconfig: './tsconfig.json' }), common(), json()], }, ]; diff --git a/packages/shared/sdk-client/rollup.config.js b/packages/shared/sdk-client/rollup.config.js index 519cf1eb3..461b4ddb3 100644 --- a/packages/shared/sdk-client/rollup.config.js +++ b/packages/shared/sdk-client/rollup.config.js @@ -1,10 +1,11 @@ import common from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; import resolve from '@rollup/plugin-node-resolve'; -import terser from '@rollup/plugin-terser'; import typescript from '@rollup/plugin-typescript'; import { visualizer } from "rollup-plugin-visualizer"; +// This library is not minified as the final SDK package is responsible for minification. + const getSharedConfig = (format, file) => ({ input: 'src/index.ts', // Intermediate modules don't bundle all dependencies. We leave that to leaf-node @@ -38,7 +39,6 @@ export default [ esmExternals: true, }), resolve(), - terser(), json(), // The 'sourcemap' option allows using the minified size, not the size before minification. visualizer({ sourcemap: true }), @@ -46,6 +46,6 @@ export default [ }, { ...getSharedConfig('cjs', 'dist/index.cjs.js'), - plugins: [typescript({ tsconfig: './tsconfig.json' }), common(), resolve(), terser(), json()], + plugins: [typescript({ tsconfig: './tsconfig.json' }), common(), resolve(), json()], }, ];