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
The plugin uses the PROCESS_ASSETS_STAGE_ADDITIONS stage when tapping into the processAssets hook. However, this stage is described as the following in the docs:
PROCESS_ASSETS_STAGE_ADDITIONS - Add additional sections to the existing assets e.g. banner or initialization code.
Considering that the plugin copies individual files or entire directories and not adds additional sections to the existing assets shouldn't we use the PROCESS_ASSETS_STAGE_ADDITIONAL stage? It looks more appropriate for this use case:
PROCESS_ASSETS_STAGE_ADDITIONAL - Add additional assets to the compilation.
The text was updated successfully, but these errors were encountered:
Updated "processAssets" hook to use the proper "PROCESS_ASSETS_STAGE_ADDITIONAL" stage instead of "PROCESS_ASSETS_STAGE_ADDITIONS" one.
Signed-off-by: Slava Fomin II <slava@fomin.io>
slavafomin
added a commit
to slavafomin/copy-webpack-plugin
that referenced
this issue
Apr 5, 2021
Updated "processAssets" hook to use the proper "PROCESS_ASSETS_STAGE_ADDITIONAL" stage
instead of "PROCESS_ASSETS_STAGE_ADDITIONS" one.
Signed-off-by: Slava Fomin II <slava@fomin.io>
I was looking into the code of this plugin and found some discrepancy here:
copy-webpack-plugin/src/index.js
Lines 615 to 619 in dde71f0
The plugin uses the
PROCESS_ASSETS_STAGE_ADDITIONS
stage when tapping into theprocessAssets
hook. However, this stage is described as the following in the docs:Considering that the plugin
copies individual files or entire directories
and notadds additional sections to the existing assets
shouldn't we use thePROCESS_ASSETS_STAGE_ADDITIONAL
stage? It looks more appropriate for this use case:The text was updated successfully, but these errors were encountered: