Extract css to separate file with webpack and mini-css-extract-plugin
See original GitHub issueI want to exclude bundled style from js files and put them in separate css file (chunk). Did some searching about this matter but couldn’t find anything working and exactly pointing to the issue.
In my app I can extract styles using mini-css-extract-plugin
when they are defined outside js in css/scss files but have no success in extracting MUI styles. Is there any way to achieve that?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:5 (3 by maintainers)
Top Results From Across the Web
MiniCssExtractPlugin
This plugin extracts CSS into separate files. It creates a CSS file per JS file which contains CSS. It supports On-Demand-Loading of CSS...
Read more >Separating CSS
Webpack provides a means to generate a separate CSS bundles using mini-css-extract-plugin (MCEP). It can aggregate multiple CSS files into one.
Read more >How to get mini-css-extract-plugin to work with webpack 5?
I've read the way to do this is using mini-css-extract-plugin. Am I doing something wrong? Is there another way to extract the css...
Read more >✏ Handle CSS in webpack | Extract CSS ...
We implement the extraction of CSS in a separate file that is executed at the ... In the terminal invoke npm i -D...
Read more >How to generate separate css files based on entries from ...
Dear all, Could you please help to understand how can I generate separate files based on entry? My config is: module.exports = {...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@LKay This is not supported. I have done a quick exploration months ago in this direction: https://github.com/oliviertassinari/material-ui-generate-css-file. I wish we could support https://github.com/callstack/linaria in the future. It could help.
But, why would you want to do that? Is this needed?
@seprich For the CSP, consider: #17566.