arielsalminen / vue-design-system

An open source tool for building UI Design Systems with Vue.js
https://vueds.com
MIT License
2.17k stars 224 forks source link

CSS Modules support #101

Closed a-rusak closed 5 years ago

a-rusak commented 6 years ago

It is nice to have a support for Css modules https://github.com/viljamis/vue-design-system/blob/2baa6e6341078b1cbdfa68b59e9663acb33e891b/build/utils.js#L20-L25 I've add into options next lines:

modules: true,
localIdentName: "[local]_[hash:base64:8]"

from vue-loader documentation.

  1. For dev mode (npm run start) css modules are not created
  2. For build mode (npm run build:system) all css classes, no matter modules or not, are builded with hash.
arielsalminen commented 5 years ago

@a-rusak Sounds like a good idea, I think! Let me do some more experimenting around the subject and how it should be documented.

arielsalminen commented 5 years ago

I’ve added this information to the FAQ now: https://github.com/viljamis/vue-design-system/wiki/Frequently-Asked-Questions-(FAQ)#i-want-to-use-css-modules-are-those-supported

otif11 commented 5 years ago

thanks for the info. @viljamis in the FAQ you can include the file path vue-design-system/build/utils.js and the commet

  • For dev mode (npm run start) css modules are not created
  • For build mode (npm run build:system) all css classes, no matter modules or not, are builded with hash.

Thanks a lot @a-rusak