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

Comments

Projects
None yet
5 participants
@PinkyJie

PinkyJie commented Dec 15, 2015

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?

@bebraw bebraw added the question label Dec 15, 2015

@PinkyJie

This comment has been minimized.

Show comment
Hide comment
@PinkyJie

PinkyJie Dec 17, 2015

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.

PinkyJie commented Dec 17, 2015

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

This comment has been minimized.

Show comment
Hide comment
@mattkrick

mattkrick Dec 18, 2015

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.

mattkrick commented Dec 18, 2015

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 sokra added enhancement difficult and removed question labels Dec 22, 2015

@sokra

This comment has been minimized.

Show comment
Hide comment
@sokra

sokra Dec 22, 2015

Member

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

Member

sokra commented Dec 22, 2015

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

@mattkrick

This comment has been minimized.

Show comment
Hide comment
@mattkrick

mattkrick Dec 24, 2015

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.

mattkrick commented Dec 24, 2015

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

This comment has been minimized.

Show comment
Hide comment
@webpack-bot

webpack-bot Sep 14, 2017

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 commented Sep 14, 2017

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

This comment has been minimized.

Show comment
Hide comment
@webpack-bot

webpack-bot Sep 30, 2017

Issue was closed because of inactivity.

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

webpack-bot commented Sep 30, 2017

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