-
-
Notifications
You must be signed in to change notification settings - Fork 387
Closed
Description
- Operating System: MacOS Catalina
- Node Version: v12.16.1
- NPM Version: 6.13.4
- webpack Version: 5.20.2
- mini-css-extract-plugin Version: 1.3.5
Expected Behavior
Load the website correctly
Actual Behavior
Loading it on browser, gets this error:
3ad75b68b6c11f8210e7.js:384 Uncaught (in promise) TypeError: __webpack_require__.h is not a function
at Function.__webpack_require__.miniCssF (3ad75b68b6c11f8210e7.js:384)
at 3ad75b68b6c11f8210e7.js:536
at new Promise (<anonymous>)
at loadStylesheet (3ad75b68b6c11f8210e7.js:535)
at Object.__webpack_require__.f.miniCss (3ad75b68b6c11f8210e7.js:551)
Code
// webpack.config.js, see the reprod repo for more details
new MiniCssExtractPlugin({
filename: '[fullhash].css',
chunkFilename: '[fullhash].chunk.css',
})
// In index.js, load scss in a separate chunk
import('./style.css');
How Do We Reproduce?
- Go to this repro and branch https://github.com/zlk89/webpack-reprods/tree/mini-css-breaks-fullhash
yarn install
yarn start
- Open http://localhost:8080/ you will see the error on console
This bug only happens when you use fullhash
in the css name, and async loading the css file
Metadata
Metadata
Assignees
Labels
No labels