faceyspacey / flush-chunks-boilerplate-webpack

universal webpack boilerplate for Webpack Flush Chunks + React Universal Component
MIT License
5 stars 5 forks source link

update to extract-css-chunks-webpack-plugin": "^2.0.4" causes error #1

Open stijndeschuymer opened 7 years ago

stijndeschuymer commented 7 years ago

update to extract-css-chunks-webpack-plugin": "^2.0.4" causes error:

flush-chunks-boilerplate-webpack/node_modules/webpack/lib/TemplatedPathPlugin.js:71
        .replace(REGEXP_NAME, getReplacer(chunkName))
   ^
Error: Path variable [name] not implemented in this context: [name].css

I see changes have been made in https://github.com/webpack-contrib/extract-text-webpack-plugin/commit/c9a19ad relating to [name].

Are there changes required in the webpack config? Thanks

faceyspacey commented 7 years ago

There may be. I'll look on Monday. But the -chunknames boilerplate is more up to date and tested with the latest ECCWP package. We're moving more toward chunkNames and away from moduleIds as the latter requires more work on the server.

Let me know if this boilerplate works better for you:

https://github.com/faceyspacey/flush-chunks-boilerplate-webpack-chunknames

We've also moved to not generating no_css.js chunks and instead made a babel plugin that fetches both a js chunk and a css stylesheet:

https://medium.com/faceyspacey/webpacks-import-will-soon-fetch-js-css-here-s-how-you-do-it-today-4eb5b4929852

stijndeschuymer commented 7 years ago

Thanks, I'll check that out. I think the link in the medium article should point to https://github.com/faceyspacey/flush-chunks-boilerplate-webpack-chunknames as well ( currently it points to https://github.com/faceyspacey/flush-chunks-boilerplate-babel-chunknames which doesn't have the dual import stuff)

faceyspacey commented 7 years ago

Good catch. Just updated the link within the article.

Are you still having that issue with the correct boilerplate?

stijndeschuymer commented 7 years ago

No I got it working! Thanks for the articles and boilerplates! Big help!