-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usage instructions from readme don't work with react-app-rewired >= 2.0 #110
Comments
Working const {
override,
disableEsLint,
addBabelPlugin,
} = require('customize-cra')
module.exports = override(
disableEsLint(),
addBabelPlugin('transform-react-pug')
)
Alternative:
const {
override,
disableEsLint,
useBabelRc
} = require('customize-cra')
module.exports = override(
disableEsLint(),
useBabelRc()
)
(prefixing the JSX transform with |
@egasimus yeah, it's hard to keep on track all other plugins. Thank you for notifying and for the workarounds. We definitely need to add it to README. |
not yet working with typescript i think, I receive a TSError, not a ESError... |
Here's another solution without disabling eslint. config-overrides.js: const {override, addBabelPlugin} = require('customize-cra')
module.exports = override(
addBabelPlugin('transform-react-pug')
) Install eslint plugin for pug: yarn add eslint-plugin-react-pug Edit "eslintConfig": {
"extends": ["react-app", "plugin:react-pug/all"],
"plugins": [
"react-pug"
]
}, .env: EXTEND_ESLINT=true |
I'm currently looking into a solution with the suggested customize-cra library. It seems to have functions for adding Babel plugins. Gonna try them out and report back.
The text was updated successfully, but these errors were encountered: