Open popcornkiller1088 opened 5 years ago
Hi, just found out put instead of put those code inside babel.rc, I can put those code in package.json.
"babel": {
"presets": [
"react-app"
],
"plugins": [
"transform-react-pug"
]
},
and will require to install eslint, then, add those code in package.json to configure eslint.
"eslintConfig": {
"plugins": [
"react-pug"
],
"extends": [
"react-app",
"plugin:react-pug/all"
]
},
@popcornkiller1088 that's a good information for others, I think we should add this to README. Thanks ;).
Hi, just found out put instead of put those code inside babel.rc, I can put those code in package.json.
Where did you read this?
I tried, and any babel configuration in the package.json file gets ignored.
My answer is 1 years ago, I think the create-react-app might have change their way of configure things
I ended up using this: https://github.com/timarney/react-app-rewired
And this (using it's addBabelPlugin
function): https://github.com/arackaf/customize-cra
It works fine (so issue can be closed); though I do wish create-react-app
supported configuration extensions intrinsically.
Try to use this plugin in create react app, I run npm eject but that's no .babelrc file, just a config folder with some webpack config.