I'm working on a multi-entry web app & building with webpack 3, with using extract-text-webpack-plugin to separate entries' css in separate files.
Currently, I'm trying to load some modules dynamically along with their own css to enhance performance, so I used the plugin's allChunks: false option with using the style-loader as a fallback, which works fine when the css file is being required in dynamic modules only, or non-dynamic entry-points only,
I've made a sample project to demonstrate this issue, so let's assume the following entries:
entry2:dynamic.cssshould be part of the extracted cssentry2.css--> which works fineentry1:dynamic.cssshould be part of the dynamically imported chunkdynamic.js, where the contents ofdynamic.csswill be injected in page withstyle-loader--> This doesn't work, insteaddynamic.cssis totally gone
I've already opened an issue on plugin's github repo, but it seems that they are focusing on webpack 4 more than webpack 3, so I'm not expecting they would respond to my issue!
Question is
Is there a workaround to load this shared css dynamically (overcoming this reported issue)?