2.0.0 • Published 3 years ago
laravel-mix-react-css-modules v2.0.0
Babel-plugin-react-css-modules wrapper for Laravel Mix
This plugin integrates babel-plugin-react-css-modules into the core of Laravel Mix. Shoutout to both @JeffreyWay and @gajus for their outstanding work!
Breaking version
Please note that the 2.0.0 version is only compatible with Laravel Mix 5, because earlier versions contained a different Webpack context path.
Example
Just import the package and it will automagically attach itself to Laravel Mix. Then just call reactCSSModules
and all CSS files will be correctly processed.
let mix = require('laravel-mix');
require('laravel-mix-react-css-modules');
mix.react('resources/assets/app.js', 'public/js')
.reactCSSModules();
It is also possible to modify the way a classname is generated, by supplying a new syntax to the function. Check this to see how the syntax works.
let mix = require('laravel-mix');
require('laravel-mix-react-css-modules');
// DEFAULT: [name]__[local]___[hash:base64:5]
mix.react('resources/assets/app.js', 'public/js')
.reactCSSModules('[path]__[name]___[hash:base64]');
2.1.0-beta.0
3 years ago
3.0.0-alpha.1
3 years ago
3.0.0-alpha.0
4 years ago
2.0.1-beta.0
4 years ago
2.0.0
4 years ago
1.3.0
5 years ago
1.2.0
6 years ago
1.1.0
6 years ago
1.0.0
6 years ago