What is the right compilation hook to transform asset module names prior to emit? #18943
-
|
Our CDN has a limitation where all uploaded files need to have lowercase names so that they are fetched correctly. For chunks, we have a custom Webpack plugin that taps into Now we are switching our static assets (images and fonts) from Currently we have a workaround by setting a transform function to |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
There is a hook to work with assets - https://github.com/webpack/webpack/blob/main/lib/Compilation.js#L844, using custom |
Beta Was this translation helpful? Give feedback.
Just change names in
compilation.assetsand use the early stage: