1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

feat(web): separate command to build with rollup plugin visualizer (#9097)

separate command to build with rollup plugin visualizer
This commit is contained in:
Nguyễn Hoàng Đức 2024-04-27 02:36:30 +07:00 committed by GitHub
parent 53d571d29e
commit 0ff0b891a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -5,6 +5,7 @@
"scripts": { "scripts": {
"dev": "vite dev --host 0.0.0.0 --port 3000", "dev": "vite dev --host 0.0.0.0 --port 3000",
"build": "vite build", "build": "vite build",
"build:stats": "BUILD_STATS=true vite build",
"package": "svelte-kit package", "package": "svelte-kit package",
"preview": "vite preview", "preview": "vite preview",
"check:svelte": "svelte-check --no-tsconfig --fail-on-warnings", "check:svelte": "svelte-check --no-tsconfig --fail-on-warnings",

View file

@ -30,10 +30,12 @@ export default defineConfig({
}, },
plugins: [ plugins: [
sveltekit(), sveltekit(),
visualizer({ process.env.BUILD_STATS === 'true'
emitFile: true, ? visualizer({
filename: 'stats.html', emitFile: true,
}), filename: 'stats.html',
})
: undefined,
enhancedImages(), enhancedImages(),
], ],
optimizeDeps: { optimizeDeps: {