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

fingerprint css? #140

Open
wenzowski opened this issue Apr 19, 2016 · 2 comments
Open

fingerprint css? #140

wenzowski opened this issue Apr 19, 2016 · 2 comments

Comments

@wenzowski
Copy link
Contributor

wenzowski commented Apr 19, 2016

The javascript chunking configuration currently uses [name]_[chunkhash].js as filename, which makes it easy to permanently cache the chunk: if its contents change its name changes as well.

Currently we have a single prerender.css. What would it take to do the same thing with css chunks?

followup to #139

@mattkrick
Copy link
Owner

oh wow, exactly my thoughts after reading #139. Yeah, let's just chunkhash the css file. Although fair warning, I'm thinking about doing away with stylesheets in the future, so I'm not sure if it's worth the effort. For future reference though:

  1. add in a chunkhash on the filename
  2. add the AssetsPlugin to the webpack server config, set it to serve a new file, eg serverAssets.json
  3. grab the css from serverAssets & inject it into the HTML (currently it's hardcoded to prerender.css)

@wenzowski
Copy link
Contributor Author

I thought something like that might be in the works.

Thanks for the instructions. If I get to that change before you ditch the stylesheet I'll send a PR.

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

No branches or pull requests

2 participants