diff --git a/README.md b/README.md index 5a99ca234..047591800 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,6 @@ FIXME: Write the rest... ## Work left to do -- Add Babel as a default loader - Consider chunking setup - Consider switching to Webpack 2.0 - Consider on-demand compiling with digests when digesting=true diff --git a/lib/install/config/shared.js b/lib/install/config/shared.js index 2e0ac0ae7..e87cdda13 100644 --- a/lib/install/config/shared.js +++ b/lib/install/config/shared.js @@ -12,7 +12,15 @@ module.exports = { module: { loaders: [ - { test: /\.coffee$/, loader: "coffee-loader" } + { test: /\.coffee$/, loader: "coffee-loader" }, + { + test: /\.js$/, + exclude: /node_modules/, + loader: 'babel-loader', + query: { + presets: ['es2015'] + } + } ] }, diff --git a/lib/install/template.rb b/lib/install/template.rb index 47e2d977b..87c637be1 100644 --- a/lib/install/template.rb +++ b/lib/install/template.rb @@ -7,7 +7,7 @@ directory "#{INSTALL_PATH}/config", 'config/webpack' -run './bin/yarn add webpack lodash' +run './bin/yarn add webpack lodash babel-loader babel-core babel-preset-es2015' environment \ "# Make javascript_pack_tag lookup digest hash to enable long-term caching\n" +