Skip to content

Commit

Permalink
fix: Install correct (es2015) babel preset to match generated config (
Browse files Browse the repository at this point in the history
#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`.
  • Loading branch information
nilliams authored and evenstensberg committed May 13, 2017
1 parent 3464d9e commit b0af53f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/creator/yeoman/webpack-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module.exports = class WebpackGenerator extends Generator {
]).then( (ans) => {
if(ans['babelConfirm'] === true) {
this.configuration.config.webpackOptions.module.rules.push(getBabelPlugin());
this.npmInstalls.push('babel-loader', 'babel-core', 'babel-preset-env');
this.npmInstalls.push('babel-loader', 'babel-core', 'babel-preset-es2015');
}
}).then( () => {
this.prompt([
Expand Down

0 comments on commit b0af53f

Please sign in to comment.