mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-25 22:38:19 -05:00
feat!: deprecate css.modules in favor of css.requireModuleExtension (#4387)
closes #4376 Since css-loader v3, custom CSS Modules configurations are under the `modules` field. So when a user customizes these configurations, the `modules` feature is automatically enabled for all css files. So we must require the user's explicit consensus or disagreement on whether these rules apply to all CSS files or not.
This commit is contained in:
+2
-2
@@ -89,13 +89,13 @@ import styles from './foo.module.css'
|
||||
import sassStyles from './foo.module.scss'
|
||||
```
|
||||
|
||||
If you want to drop the `.module` in the filenames, set `css.modules` to `true` in `vue.config.js`:
|
||||
If you want to drop the `.module` in the filenames, set `css.requireModuleExtension` to `false` in `vue.config.js`:
|
||||
|
||||
``` js
|
||||
// vue.config.js
|
||||
module.exports = {
|
||||
css: {
|
||||
modules: true
|
||||
requireModuleExtension: false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user