Skip to content

Commit 81903ec

Browse files
author
Walker Leite
committed
feat(babel): change babel configuration
1 parent 11915d1 commit 81903ec

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

template/.babelrc

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
{
2-
"presets": ["es2015"],
2+
"presets": [
3+
["env", {
4+
"targets": {
5+
"browsers": [
6+
"> 1%",
7+
"last 2 versions",
8+
"not ie <= 8"
9+
]
10+
}
11+
}],
12+
"stage-2"
13+
],
314
"plugins": [
4-
[
5-
"babel-plugin-root-import", [{
6-
"rootPathPrefix": "~",
7-
"rootPathSuffix": "."
8-
}, {
15+
["babel-plugin-root-import", [
16+
{
17+
"rootPathPrefix": "~",
18+
"rootPathSuffix": "."
19+
},
20+
{
921
"rootPathPrefix": "@",
1022
"rootPathSuffix": "client"
1123
}
12-
]
13-
]
24+
]]
1425
]
1526
}

template/gulp-tasks/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ gulp.task('build:client', ['copy:client'], () => {
4141

4242
b.transform(vueify);
4343

44-
b.transform(babelify);
44+
b.transform(babelify, {plugins: ['transform-runtime']});
4545

4646
b.plugin(modulesify, {
4747
output: path.resolve(

template/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
},
4242
"devDependencies": {
4343
"babel-core": "^6.25.0",
44-
"babel-preset-es2015": "^6.24.1",
44+
"babel-plugin-transform-runtime": "^6.23.0",
45+
"babel-preset-env": "^1.6.1",
46+
"babel-preset-stage-2": "^6.24.1",
4547
"babelify": "^7.3.0",
4648
"browserify": "^14.4.0",
4749
"chai": "^4.1.0",

0 commit comments

Comments
 (0)