Skip to content

Commit

Permalink
Use es2015 for lib compile
Browse files Browse the repository at this point in the history
  • Loading branch information
fchasen committed Dec 9, 2016
1 parent 67be213 commit 40d41cb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
9 changes: 1 addition & 8 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"presets": [
["env", {
"targets": {
"chrome": 54,
"safari" : 10,
"firefox" : 50,
"edge" : 14
}
}]
["es2015"]
],
"plugins": [
"add-module-exports"
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"babel-plugin-transform-runtime": "^6.15.0",
"babel-polyfill": "^6.16.0",
"babel-preset-env": "0.0.9",
"babel-preset-es2015": "^6.18.0",
"babili-webpack-plugin": "0.0.7",
"colors": "^1.1.2",
"connect": "^3.0.1",
Expand Down
20 changes: 14 additions & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,28 @@ module.exports = {
},
module: {
loaders: [
LEGACY ? {
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader",
query: {
query: LEGACY ? {
presets: ['es2015'],
plugins: [
"add-module-exports",
]
} : {
presets: [["env", {
"targets": {
"chrome": 54,
"safari" : 10,
"firefox" : 50,
"edge" : 14
}
}]],
plugins: [
"add-module-exports",
]
}
} : {
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader"
}
]
}
Expand Down

0 comments on commit 40d41cb

Please sign in to comment.