Hi please help me understand the differences between setting babel config inside .babelrc vs webpack loader options, vs inserting it in package.json.
For example, Would it make any difference if I put the presets in the webpack babel-loader options vs package.json or a separate .babelrc config file?
In webpack config:
{
test: /.(js|jsx|mjs)$/,
loader: require.resolve('babel-loader'),
options: {
"presets": [
"react-app"
]
},
},
In package json:
"babel": {
"presets": [
"react-app"
]
},
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…