There is used next code to enable import and jsx:
require('babel-register')({ ignore: /\/(build|node_modules)\//, presets: ['env','react-app'] })
But at the same time next code also works(react-app was changed to react):
require('babel-register')({ ignore: /\/(build|node_modules)\//, presets: ['env','react'] })
As I understand there is used babel-preset-react. But I can’t understand why it works with react-app..
There is used next code to enable
import
and jsx:require('babel-register')({ ignore: /\/(build|node_modules)\//, presets: ['env','react-app'] })
But at the same time next code also works(
react-app
was changed toreact
):require('babel-register')({ ignore: /\/(build|node_modules)\//, presets: ['env','react'] })
As I understand there is used
babel-preset-react
. But I can’t understand why it works with react-app..Please explain this moment..