babel-plugin-vue-jsx-scoped-css
🔨 CSS encapsulation solution for Vue JSX
About
This plugin is used to implement the css scoped effect of template in vue jsx。
For more details, please refer to react-scoped-css
Use
You have to add one babel plugin and one webpack loader.
Babel
yarn add babel-plugin-vue-jsx-scoped-css --dev
and in your babelrc add
also note that you can define your own matching rule like this
This plugin must be before the vue jsx parsing plugin.
Webpack
yarn add scoped-css-loader --dev
and in your webpack.config.js