-
Notifications
You must be signed in to change notification settings - Fork 3
Description
On another project this week I observed that a multi-config Webpack setup (a webpack file exporting an array of configuration objects) in which one config has a CSS-only entry, and the other does not, can cause the valid JS file for the not-only-CSS entry to be deleted as well if both configurations include the fixStyleOnlyEntries plugin.
Removing the plugin from the config which does not include a CSS-only entry fixes the issue, but because it is significantly harder to remove a plugin from a generated Webpack configuration than it is to add a plugin to a specific configuration, we should solve this problem by removing this plugin from the presets.production factory. It will not be necessary in all builds, so the presence of unintuitive destructive behavior in some cases is worse than the inconvenience of having to include the plugin manually when consuming these helpers.
This will be a breaking change.
See #93 for fix