mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-23 21:40:00 -05:00
feat(css modules): Add CSS Module localIdentName option to vue config (#915)
Changed the vue config to take a user input option for CSS module localIdentName and default back to initial localIdentName ([name]_[local]__[hash:base64:5])
This commit is contained in:
committed by
Evan You
parent
bbc931c285
commit
31cdc8636f
@@ -17,6 +17,8 @@ As for standalone style files, any files ending with `.module.(css|sass|scss|les
|
||||
|
||||
If you wish to be able to use CSS modules without the `.module` postfix, you can set `css: { modules: true }` in `vue.config.js`. This option does not affect `*.vue` files.
|
||||
|
||||
If you wish to customize the CSS modules class name output you can set the `css: { localIdentName: [name]__[local]--[hash:base64:5]}` in `vue.config.js`.
|
||||
|
||||
### Pre-Processors
|
||||
|
||||
You can select pre-processors (Sass/Less/Stylus) when creating the project. If you did not do so, you can also just manually install the corresponding webpack loaders. The loaders are pre-configured and will automatically be picked up. For example, to add Sass to an existing project, simply run:
|
||||
|
||||
Reference in New Issue
Block a user