Set of dependencies for running webpack with babel.
npm install --save-dev build-tools-webpack-babel
In webpack.config.js
:
const { rules } = require('build-tools-webpack-babel');
module.exports = {
module: {
rules
}
};
or combined with other rules/loaders:
const { rules: babelRules } = require('build-tools-webpack-babel');
module.exports = {
module: {
rules: [
...babelRules,
... // other loaders
]
}
}