Webpack CSS chunks are extracted but not loaded - extract-css-chunks-webpack-plugin

浪尽此生 提交于 2021-01-29 15:10:15

问题


I'm currently working on code-splitting on CSS files on my React project. This project is built with webpack 3, and with the help of extract-css-chunks-webpack-plugin, CSS chunks are generated nicely.

However, I found that some chunks are not loaded or imported by any JS files.

I've made a simplified project from my real project to demonstrate this issue. (here)
In this example, when the dev-server.js is running, both app-[hash].js and app-[contentdash].css are loaded, while 0-[hash].js is loaded without 0-[contentdash].css

Question is

how to get the css chunks loaded by the corresponding js chunks?

来源:https://stackoverflow.com/questions/65067949/webpack-css-chunks-are-extracted-but-not-loaded-extract-css-chunks-webpack-plu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!