Skip to content

Commit

Permalink
Configure minify (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Aug 12, 2024
1 parent 91e21b1 commit f987f4f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,21 @@ export default defineConfig({
comfyAPIPlugin(),
],
build: {
minify: false,
minify: 'esbuild',
target: 'es2015',
sourcemap: true,
rollupOptions: {
// Disabling tree-shaking
// Prevent vite remove unused exports
treeshake: false
}
},
esbuild: {
minifyIdentifiers: false,
keepNames: true,
minifySyntax: true,
minifyWhitespace: true,
},
define: {
'__COMFYUI_FRONTEND_VERSION__': JSON.stringify(process.env.npm_package_version),
},
Expand Down

0 comments on commit f987f4f

Please sign in to comment.