Installation
This one package will let you use all the new approved Javascript features in your .js
files with Babel Compiler.
Use npm install webpack-babel-installer
instead of installing all dependencies and loaders separately.
The following dependencies will be installed:
Package name |
---|
babel-core |
babel-loader |
babel-preset-env |
webpack |
Configuration
Set loader
Add the loader to your webpack.config.js
file
module: rules: test: /\.js$/ exclude:// loader:"babel-loader" query: presets:"env"