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..
Please explain this moment..
There is used next code to enable
importand jsx:require('babel-register')({ ignore: /\/(build|node_modules)\//, presets: ['env','react-app'] })But at the same time next code also works(
react-appwas 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..