mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
Conditionally generate vendor import map outside cloud builds (#6559)
## Summary - gate vendor import-map generation behind non-cloud distributions - keep cloud bundles slim while preserving prebuilt chunks for desktop/localhost builds - document the conditional to guide future CDN/cache work ## Testing - [ ] DISTRIBUTION=cloud pnpm build - [ ] DISTRIBUTION=desktop pnpm build ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6559-Conditionally-generate-vendor-import-map-outside-cloud-builds-2a06d73d3650819d96a0e2b6c006baf1) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -222,41 +222,46 @@ export default defineConfig({
|
|||||||
: [vue()]),
|
: [vue()]),
|
||||||
tailwindcss(),
|
tailwindcss(),
|
||||||
comfyAPIPlugin(IS_DEV),
|
comfyAPIPlugin(IS_DEV),
|
||||||
generateImportMapPlugin([
|
// Skip import-map generation for cloud builds to keep bundle small
|
||||||
{
|
...(DISTRIBUTION !== 'cloud'
|
||||||
name: 'vue',
|
? [
|
||||||
pattern: 'vue',
|
generateImportMapPlugin([
|
||||||
entry: './dist/vue.esm-browser.prod.js'
|
{
|
||||||
},
|
name: 'vue',
|
||||||
{
|
pattern: 'vue',
|
||||||
name: 'vue-i18n',
|
entry: './dist/vue.esm-browser.prod.js'
|
||||||
pattern: 'vue-i18n',
|
},
|
||||||
entry: './dist/vue-i18n.esm-browser.prod.js'
|
{
|
||||||
},
|
name: 'vue-i18n',
|
||||||
{
|
pattern: 'vue-i18n',
|
||||||
name: 'primevue',
|
entry: './dist/vue-i18n.esm-browser.prod.js'
|
||||||
pattern: /^primevue\/?.*/,
|
},
|
||||||
entry: './index.mjs',
|
{
|
||||||
recursiveDependence: true
|
name: 'primevue',
|
||||||
},
|
pattern: /^primevue\/?.*/,
|
||||||
{
|
entry: './index.mjs',
|
||||||
name: '@primevue/themes',
|
recursiveDependence: true
|
||||||
pattern: /^@primevue\/themes\/?.*/,
|
},
|
||||||
entry: './index.mjs',
|
{
|
||||||
recursiveDependence: true
|
name: '@primevue/themes',
|
||||||
},
|
pattern: /^@primevue\/themes\/?.*/,
|
||||||
{
|
entry: './index.mjs',
|
||||||
name: '@primevue/forms',
|
recursiveDependence: true
|
||||||
pattern: /^@primevue\/forms\/?.*/,
|
},
|
||||||
entry: './index.mjs',
|
{
|
||||||
recursiveDependence: true,
|
name: '@primevue/forms',
|
||||||
override: {
|
pattern: /^@primevue\/forms\/?.*/,
|
||||||
'@primeuix/forms': {
|
entry: './index.mjs',
|
||||||
entry: ''
|
recursiveDependence: true,
|
||||||
}
|
override: {
|
||||||
}
|
'@primeuix/forms': {
|
||||||
}
|
entry: ''
|
||||||
]),
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
])
|
||||||
|
]
|
||||||
|
: []),
|
||||||
|
|
||||||
Icons({
|
Icons({
|
||||||
compiler: 'vue3',
|
compiler: 'vue3',
|
||||||
|
|||||||
Reference in New Issue
Block a user