Closed nemoisfree closed 7 years ago
@nemoisfree I meet the same problem, how to tune .babelrc file
@nemoisfree Please share your findings with @anhuiliujun
@anhuiliujun @gajus
try babelrc file
{ "presets": [ ["es2015"] ], "plugins": [ "transform-react-jsx", ["react-css-modules", { "filetypes": { ".scss": "postcss-scss", }} ] ] }
or webpack2 config
https://github.com/gajus/babel-plugin-react-css-modules/blob/master/demo/webpack.config.js
This babelrc snippet above throws error:
[ { keyword: 'type',
dataPath: '.filetypes[\'.scss\']',
schemaPath: '#/properties/filetypes/patternProperties/%5C..*/type',
params: { type: 'object' },
message: 'should be object' } ]
Same exact issue as @Mike-Now
Edit: This seems to be the solution: https://github.com/gajus/babel-plugin-react-css-modules/issues/104#issuecomment-309612178
Hello. How to tune .babelrc file, i didn't find it in documentation.
my
.babelrc
not working