question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extract css to separate file with webpack and mini-css-extract-plugin

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
oliviertassinaricommented, Oct 21, 2019

@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?

1reaction
oliviertassinaricommented, Oct 21, 2019

@seprich For the CSP, consider: #17566.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found