Closed
Description
Describe the bug
When the build mode
is not "production", vite-plugin-svelte assumes that it is not a production build, so it produces a dev build, which leads to a large bundle size (among other things).
This was raise by @antony on Discord. The current workaround is to have this in the svelte config:
const isDevelopmentMode = process.env.NODE_ENV === 'development'
compilerOptions: {
dev: isDevelopmentMode
},
hot: isDevelopmentMode,
vite: {
mode: process.env.NODE_ENV
}
Reproduction
We shouldn't be checking the env mode as production
here
Logs
No response
System Info
Not related.
Severity
annoyance