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
Webpack plugins use different stages for their functionality.
13
+
For properly work other plugins can be specified the `stage` when should be removed empty scripts: before or after processing of other webpack plugins.\
14
+
For example, using `@wordpress/dependency-extraction-webpack-plugin` the empty scripts must be removed `after` processing all plugins.
15
+
Using `webpack-manifest-plugin` the empty scripts must be removed `before` processing other plugins.
16
+
- chore: update packages
17
+
- test: added the test for using with webpack-manifest-plugin
18
+
- docs: update readme
19
+
1
20
## 0.8.4 (2022-09-08)
2
21
- fix: fixed last stable version of ansis in package.json to avoid issues in dependency
Copy file name to clipboardExpand all lines: README.md
+77-20Lines changed: 77 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,21 @@
10
10
The plugin removes empty `js` scripts generated when using only the styles like `css``scss``sass``less``stylus` in the webpack entry.
11
11
12
12
This is improved fork of original plugin [webpack-fix-style-only-entries](https://github.com/fqborges/webpack-fix-style-only-entries) ver. 0.6.0.\
13
-
This fork fixes some deprecation messages and some issues in React. See the details in [changelog](https://github.com/webdiscus/webpack-remove-empty-scripts/blob/master/CHANGELOG.md#061-oct-20-2020).
13
+
This fork fixes deprecation messages, issues when using React and some specific plugins.
14
14
15
15
The plugin support only `Webpack 5`.
16
16
For `Webpack 4` use original [plugin](https://github.com/fqborges/webpack-fix-style-only-entries).
17
17
18
+
> **Warning**
19
+
>
20
+
> The new version `1.0.0` has probable `BRAKING CHANGE`.\
21
+
> In this version was reverted defaults behavior as in `v0.8.1` - remove empty scripts `before` processing other plugins.
22
+
23
+
> **Migration to v1.0.0**
24
+
>
25
+
> When update from `<= v0.8.1`, nothing needs to be done.\
26
+
> When update from `v0.8.2 - v0.8.4`, if you have an issue, try to use new `stage` option with `RemoveEmptyScriptsPlugin.STAGE_AFTER_PROCESS_PLUGINS` value.
27
+
18
28
## Description of the problem
19
29
20
30
Webpack generates a js file for each resource defined in a webpack entry.
Remove empty scripts `after` processing all other plugins.\
153
+
For example, exact this stage needs for properly work of the `@wordpress/dependency-extraction-webpack-plugin`.
154
+
155
+
Webpack plugins use different stages for their functionality.
156
+
For properly work other plugins can be specified the `stage` when should be removed empty scripts: before or after processing of other webpack plugins.
157
+
158
+
See [usage example](#usage-stage-optoion).
159
+
160
+
> **Warning**
161
+
>
162
+
> Because `webpack-manifest-plugin` and `@wordpress/dependency-extraction-webpack-plugin` needs different stages
163
+
> both plugins can't be used together with `RemoveEmptyScriptsPlugin` at one configuration.
0 commit comments