Skip to content

Commit b0af53f

Browse files
nilliamsevenstensberg
authored andcommitted
fix: Install correct (es2015) babel preset to match generated config (#138)
The config generated uses `presets: ['es2015']`, see: https://github.com/webpack/webpack-cli/blob/master/lib/creator/yeoman/utils/module.js#L8 ... but are previously installing `babel-preset-env` instead, which causes error when user answers `y` to 'Will you be using ES2015?', then runs `webpack`.
1 parent 3464d9e commit b0af53f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/creator/yeoman/webpack-generator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ module.exports = class WebpackGenerator extends Generator {
9494
]).then( (ans) => {
9595
if(ans['babelConfirm'] === true) {
9696
this.configuration.config.webpackOptions.module.rules.push(getBabelPlugin());
97-
this.npmInstalls.push('babel-loader', 'babel-core', 'babel-preset-env');
97+
this.npmInstalls.push('babel-loader', 'babel-core', 'babel-preset-es2015');
9898
}
9999
}).then( () => {
100100
this.prompt([

0 commit comments

Comments
 (0)