-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Labels
Description
Clear and concise description of the problem
Currently when building in lib mode we do not minify the ES build because that would remove pure annotations and break treeshaking. However, this is assuming that the ES build is only used with bundlers. In the future, more users could be using ES builds over CDNs with native ES imports, so a minified ES build could be necessary for those cases.
Suggested solution
// vite config
build: {
lib: {
formats: ['es', 'es.min']
}
}
Alternative
lib: { minifyES: true }
Additional context
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
nrgnrg, NicolasRichel, mariohamann, fychinesepjj, ernestoalejo and 53 moreyunsii, itssumitrai and crutchcorn