diff --git a/frontend/packages/cli/package.json b/frontend/packages/cli/package.json index 9c3447759..2916976c3 100644 --- a/frontend/packages/cli/package.json +++ b/frontend/packages/cli/package.json @@ -54,5 +54,6 @@ }, "files": [ "dist-cli/**/*" - ] + ], + "sideEffects": false } diff --git a/frontend/packages/cli/vite.config.ts b/frontend/packages/cli/vite.config.ts index 945ea7d77..214af263b 100644 --- a/frontend/packages/cli/vite.config.ts +++ b/frontend/packages/cli/vite.config.ts @@ -12,8 +12,12 @@ export default defineConfig({ build: { chunkSizeWarningLimit: 5000, // TODO: Reduce this value if possible emptyOutDir: true, + minify: 'esbuild', outDir, rollupOptions: { + treeshake: { + moduleSideEffects: false, + }, plugins: [ { // Excludes `schema.json` from the build output as it is generated by the CLI during `erd build`.