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
When using function in output.publicPath of Webpack config, the loader of mini-css-extract-plugin seems to handle this situation incorrectly and leading to an error(see below).
If this is a bug, I'm glad to make a PR
Actual Behavior
assets by status 822 bytes [cached] 1 asset
runtime modules 663 bytes 3 modules
cacheable modules 71 bytes
./src/index.js 32 bytes [built] [code generated]
./src/index.css 39 bytes [built] [code generated] [1 error]
ERROR in ./src/index.css
Module build failed (from ./node_modules/.pnpm/[email protected][email protected]/node_modules/mini-css-extract-plugin/dist/loader.js):
TypeError: publicPath.replace is not a function
at Object.pitch (/Users/username/Workspace/test/webpack-demo/node_modules/.pnpm/[email protected][email protected]/node_modules/mini-css-extract-plugin/dist/loader.js:176:114)
@ ./src/index.js 1:0-21
webpack 5.64.4 compiled with 1 error in 285 ms
Bug report
When using function in
output.publicPath
of Webpack config, the loader of mini-css-extract-plugin seems to handle this situation incorrectly and leading to an error(see below).Actual Behavior
Expected Behavior
Expect no errors would be throw.
How Do We Reproduce?
Reproduce repository: https://github.com/roland-reed/mini-css-extract-plugin-function-public-path, steps are listed in README.md
I dig a little and find that the following code should be related:
mini-css-extract-plugin/src/loader.js
Lines 182 to 192 in e8c08a1
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: