mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
perf: tree shaking and minify (#6068)
## Summary I believe tree-shaking does not affect [the shim](https://github.com/Comfy-Org/ComfyUI_frontend/blob/rizumu/perf/cloud-minify/build/plugins/comfyAPIPlugin.ts#L73), and it should safe to enable it. maybe we need to find the extension that will broke in this case. | | Rendered | Gzip | Brotli | |--------|-----------|----------|----------| | Before | 16.69 MB | 4.23 MB | 3.54 MB | | After | 12.07 MB | 3 MB | 2.53 MB |
This commit is contained in:
@@ -67,11 +67,8 @@ export default defineConfig([
|
|||||||
...commonParserOptions,
|
...commonParserOptions,
|
||||||
projectService: {
|
projectService: {
|
||||||
allowDefaultProject: [
|
allowDefaultProject: [
|
||||||
'vite.config.mts',
|
|
||||||
'vite.electron.config.mts',
|
'vite.electron.config.mts',
|
||||||
'vite.types.config.mts',
|
'vite.types.config.mts'
|
||||||
'playwright.config.ts',
|
|
||||||
'playwright.i18n.config.ts'
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,9 +98,6 @@ catalog:
|
|||||||
|
|
||||||
cleanupUnusedCatalogs: true
|
cleanupUnusedCatalogs: true
|
||||||
|
|
||||||
overrides:
|
|
||||||
'@types/eslint': '-'
|
|
||||||
|
|
||||||
ignoredBuiltDependencies:
|
ignoredBuiltDependencies:
|
||||||
- '@firebase/util'
|
- '@firebase/util'
|
||||||
- protobufjs
|
- protobufjs
|
||||||
@@ -115,3 +112,6 @@ onlyBuiltDependencies:
|
|||||||
- esbuild
|
- esbuild
|
||||||
- nx
|
- nx
|
||||||
- oxc-resolver
|
- oxc-resolver
|
||||||
|
|
||||||
|
overrides:
|
||||||
|
'@types/eslint': '-'
|
||||||
|
|||||||
@@ -187,14 +187,12 @@ export default defineConfig({
|
|||||||
target: 'es2022',
|
target: 'es2022',
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
// Disabling tree-shaking
|
treeshake: true
|
||||||
// Prevent vite remove unused exports
|
|
||||||
treeshake: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
esbuild: {
|
esbuild: {
|
||||||
minifyIdentifiers: false,
|
minifyIdentifiers: SHOULD_MINIFY,
|
||||||
keepNames: true,
|
keepNames: true,
|
||||||
minifySyntax: SHOULD_MINIFY,
|
minifySyntax: SHOULD_MINIFY,
|
||||||
minifyWhitespace: SHOULD_MINIFY
|
minifyWhitespace: SHOULD_MINIFY
|
||||||
|
|||||||
Reference in New Issue
Block a user