Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate separate CSS file for each chunk(not only initial chunk)? #1758

Closed
PinkyJie opened this issue Dec 15, 2015 · 6 comments
Closed

Generate separate CSS file for each chunk(not only initial chunk)? #1758

PinkyJie opened this issue Dec 15, 2015 · 6 comments

Comments

@PinkyJie
Copy link

Is it possible to generate separate CSS file for each chunk?
new ExtractTextPlugin('[name].css') can only generate CSS file for entry chunks(initial chunks), if I add parameter {allChunks: true}, it will output CSS in other chunks in the initial chunks also. Is there a way to exclude CSS in non-initial chunks and output them in separate file?

@PinkyJie
Copy link
Author

I'm asking this is because if I put assets path in CSS, and this CSS is loaded by chunk, then Chrome can not resolve this path correctly.

7iua7

When I right click the background URL path in the Dev tool, the full URL is chrome-devtools://devtools/bundled/assets/images/logo.46e065707257b2930a699c7cdacd7e86.png.

@mattkrick
Copy link

I'm interested in this, too. However, we'd also need a way to corroborate a route to a css chunk, otherwise you won't know what css chunk to ask for on a given route.

@sokra
Copy link
Member

sokra commented Dec 22, 2015

Possible but pretty difficult, because chunk loading need to load css too and wait for loading...

@mattkrick
Copy link

just to make sure I understand...you're saying the problem is making sure that B.cssloads before B.js otherwise the user could see a FOUC?
If that's the case, I'd be cool with a big waring saying that predictive loading is required. I know it's not a hard guarantee against a FOUC but it should suffice for beta testing the new feature... of course I may have misunderstood the problem.

@webpack-bot
Copy link
Contributor

This issue had no activity for at least half a year.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@webpack-bot
Copy link
Contributor

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants