How to inject stylesheet on yarn build?
Closed this issue · 1 comments
jonathancochran commented
Hi, first off great work on this. I'm having some trouble figuring out how to inject the compiled css stylesheet into each html file in the build process. I'm using your multi-page configuration. The css file is correctly generated at build/static/js/styles/2.a2342afa.css
but there is no reference to it from any files. I've tried implementing the css-loader
and file-loader
in exports.extractCSS
but had no luck. Any help would be great.
jonathancochran commented
Turns out it's a problem with the chunks
field on each page config. It was not injecting runtime and vendor js -- only injected the page specific chunk. I didn't really need to specify chunks for this project so removing that field solved it. Hope this helps someone else.