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:
Nathan Zeplowitz
2018-03-01 15:17:15 -05:00
committed by Evan You
parent bbc931c285
commit 31cdc8636f
5 changed files with 26 additions and 3 deletions
+2
View File
@@ -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: