Skip to content

Commit d88a530

Browse files
committed
chore(babel): use babel-preset-env
1 parent a1619e6 commit d88a530

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

Diff for: templates/app/_.babelrc

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"presets": [
3-
"es2015",
4-
"es2016",
5-
"es2017",
6-
"stage-0"
3+
["babel-preset-env", {
4+
"targets": {
5+
"node": "6.2"
6+
}
7+
}]
78
],
89
"plugins": [
910
<%_ if(filters.flow) { -%>
1011
"transform-flow-comments",
1112
<%_ } -%>
12-
"angular2-annotations",
1313
"transform-runtime",
1414
"transform-decorators-legacy"
1515
]

Diff for: templates/app/_package.json

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"babel-plugin-transform-class-properties": "^6.6.0",
119119
"babel-plugin-transform-runtime": "^6.6.0",
120120
"babel-plugin-istanbul": "^4.1.4",
121+
"babel-preset-env": "^1.6.1",
121122
"babel-preset-es2015": "^6.6.0",
122123
"eslint": "^2.12.0",
123124
"del": "^3.0.0",

Diff for: templates/app/webpack.make.js

+17-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,23 @@ module.exports = function makeWebpackConfig(options) {
122122
use: [{
123123
loader: 'babel-loader',
124124
options: {
125-
plugins: TEST ? ['istanbul'] : [],
125+
presets: [
126+
['babel-preset-env', {
127+
// debug: true,
128+
targets: {
129+
browsers: ['last 2 versions', 'not ie < 11'],
130+
},
131+
modules: false,
132+
}]
133+
],
134+
plugins: [
135+
'transform-flow-comments',
136+
'angular2-annotations',
137+
'transform-runtime',
138+
'transform-decorators-legacy',
139+
'transform-class-properties',
140+
'transform-export-extensions',
141+
].concat(TEST ? ['istanbul'] : []),
126142
}
127143
}].concat(DEV ? '@angularclass/hmr-loader' : []),
128144
include: [

0 commit comments

Comments
 (0)