0
Node/Javascrip babel configuration
If i am using webpack loader : babel-loader, do i still need to have file .babelrc? Is this file still necessary? Why? Ps:.babelrc is used only for transpile es6 to es5
3 Respostas
+ 4
According to Usage part of your link
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
is inside webpack configuration object. So you don't need .babelrc if you are using webpack babel-loader.
+ 3
https://babeljs.io/setup#installation
From Babel's documentation, you'll need the .babelrc configuration file.
What's webpack loader?
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
This one?
0
https://webpack.js.org/loaders/babel-loader/
this is what i mean with webpack loader