feat(cssModules): namedExport support
For v17
Support css-loader : options.modules.namedexport
https://github.com/webpack-contrib/css-loader/tree/v4.3.0#namedexport
https://github.com/webpack-contrib/css-loader#namedexport
Fix: https://github.com/vuejs/vue-loader/issues/1788, https://github.com/vuejs/vue-loader/issues/1794, https://github.com/vuejs/vue-loader/issues/1709, https://github.com/vuejs/vue-loader/issues/1612, https://github.com/vuejs/vue-loader/issues/1866
Hi everyone, I'm very interested by this PR for letting us upgrade css-loader from v6 to v7 in webpack Encore, see https://github.com/symfony/webpack-encore/pull/1319
What is the state of this PR, is there anything else to do before reviewing/merging/releasing? Thanks! 🙏🏻
To be honest, I don't fully understand all the codes of vue-loader, but this PR can pass basic tests, has been released as @best-shot/vue-loader, and has supported multiple projects of the company I work for for many years. It is practically usable.
Since the release of vite, the official has only provided basic vue-loader support for many years, refusing to add any additional features and fixes. Given the official Vue's neglect of the webpack ecosystem, I have almost given up the possibility of it being merged.
If anyone would like to push forward with the merging of this feature, or help improve the reliability of the code, I would be very grateful.
To be honest, I don't fully understand all the codes of
vue-loader, but this PR can pass basic tests, has been released as@best-shot/vue-loader, and has supported multiple projects of the company I work for for many years. It is practically usable.
Thanks for your work!
However, for a package such as Symfony Webpack Encore, I am not fan of replacing the official vue-loader by an external (or even internal) fork, that would condemn the project more quickly. Also, I don't know the position of Symfony about forks, but I think it would be very similar.
Since the release of
vite, the official has only provided basicvue-loadersupport for many years, refusing to add any additional features and fixes. Given the officialVue's neglect of thewebpackecosystem, I have almost given up the possibility of it being merged.
Yeah I understand, that's what I am afraid of too when I see no releases for ~10 months :/
FYI In Encore context, I think we will take the decision to force the user to configure css-loader to not use named export if they use Vue.js + CSS Modules, since React/Preact + CSS modules users are not stuck because this kind of issue.