-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
💬 RFC
https://parceljs.org/features/production
By default, minification is enabled when using the parcel build command. You can use the --no-optimize CLI flag to disable minification and other optimizations if needed.
No, it doesn't.
An issue from 2021 clearly state that's also not the case when it is a library.
🔦 Context
When you're new to Parcel, reading that it does but then seeing it doesn't then trying to figure out why is a waste of time. The text should read:
Except for JavaScript libraries, minification is enabled by default when using the parcel build command. You can use the --no-optimize CLI flag to disable minification and other optimizations if needed.
And examples should be provided on enabling minification.
The issue linked above provides a solution to add the following in your package.json
:
{
"targets": {
"main": {
"optimize": true
}
}
}
This works for the main
, but adding similar rules for the module
target doesn't work.
💻 Examples
See description above.