You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Minify is intentionally on by default in lib mode. es is not minified as it messes with tree-shaking, though partial minification is supported in Vite 3 with #8811. There's also #6555 to completely minify regardless of treeshaking issues. If minifying is not desirable, build.minify: false should be set.
Describe the bug
In Library Mode, we usually expect that the output (CJS, ESM, UMD) are not minified. This is easier for debugging when developing applications.
ESM looks good:
But vite will minify CJS and UMD:
I know
build.minify: false
can turn this off. But it is better to make it automatic.Reproduction
https://stackblitz.com/edit/vitejs-vite-fdafhp?file=vite.config.js,index.js,dist%2Fvite-starter.cjs.js&terminal=dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: