vuejs / vue-loader

📦 Webpack loader for Vue.js components
MIT License
4.99k stars 915 forks source link

feat(css-modules): added multiple modules support; re-write tests & add more css module scenarios #2045

Open RaphaelDDL opened 1 year ago

RaphaelDDL commented 1 year ago

Hello,

The issue was first posted in CSS-Loader https://github.com/webpack-contrib/css-loader/issues/1518 as I wasn't sure if was a css-loader issue or a vue-loader issue. After very helpful assistance from Alex and upon further investigation, the issue lies in how vue-loader imports each file's style tags.

You can read my post in the link above, and also see my PoC for various test cases https://github.com/RaphaelDDL/vue3-css-module (and ofcourse, the PR where I added most of the cases as fixtures + tests)

To try sum up, in vue-loader documentation there's an entry for CSS Module regarding Custom Inject Name:

You can have more than one