Skip to content

Commit

Permalink
Merge pull request #1 from itkrt2y/add-babel
Browse files Browse the repository at this point in the history
Add babel as a default loader
  • Loading branch information
dhh authored Dec 7, 2016
2 parents 3faa6c7 + fe185b0 commit 1fb0d14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 9 additions & 1 deletion lib/install/config/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']
}
}
]
},

Expand Down
2 changes: 1 addition & 1 deletion lib/install/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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" +
Expand Down

0 comments on commit 1fb0d14

Please sign in to comment.