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
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.
The text was updated successfully, but these errors were encountered:
💬 RFC
https://parceljs.org/features/production
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:
And examples should be provided on enabling minification.
The issue linked above provides a solution to add the following in your
package.json
:This works for the
main
, but adding similar rules for themodule
target doesn't work.💻 Examples
See description above.
The text was updated successfully, but these errors were encountered: