-
-
Notifications
You must be signed in to change notification settings - Fork 199
CSS Modules no longer work #460
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
Comments
Hey @Chesskingt! Thanks for the report! Yes and no :). We did upgrade to Webpack 4 internally, and there could be some bug related to that, or you may be using a version of Could you post your exact code and the expected output? We could turn that into a test case and find out easily if there is a bug or not. Cheers! |
Sorry for delay, here's the specs (still an issue)
|
https://gist.github.com/Chesskingt/f90188ff46c24c4981dee58904138796 <-- there's the component. |
Hi @Chesskingt, Did you enable CSS modules using Encore.configureCssLoader(options => {
options.modules = true;
}); |
hi! Before, that worked right in Vue. Now, doing that works, BUT, there's an issue where ALL my css is now modualized. I use twig and Bootstrap so modularizing everything isn't an option. What ever happened to the basic vue-loader support for CSS modules within encore? |
Well, it seems that it now requires a more advanced config: https://vue-loader.vuejs.org/guide/css-modules.html#opt-in-usage We may be able to add that to the |
Hi! I have a similar issue. I added configureCssLoader and it's no longer empty but my tailwind css have been changed. Is there any other configuration I need to do? |
Hi @epcliff, It's probably the same issue. As I noted in my previous comment using "standard" CSS and CSS modules at the same time requires a more advanced configuration... which isn't easy to achieve in the current version of Encore (you would have to remove the default CSS loader and add the config given on Vue's website...) I tried something in #508 that should help with that. |
This PR was merged into the master branch. Discussion ---------- Support CSS modules in Vue.js projects by default With the current version of Encore you are able to either: * only use standard CSS (default behavior) * only use CSS modules (by calling `Encore.configureCssLoader()`) This PR should help detecting when `<style module>` is used and enabling css modules accordingly (fixes #460). **Reference:** https://vue-loader.vuejs.org/guide/css-modules.html#opt-in-usage Commits ------- 356e538 Support CSS modules in Vue.js projects by default
Hey guys!
Just updated encore to latest version and noticed that VueLoader css modules no longer are being generated (raw classnames are being generated instead and
$style.className
no longer returns appropriate class)...Was there something changed that broke CSS modules or is this an error?
Thanks!
The text was updated successfully, but these errors were encountered: