Skip to content

Commit 84bcca6

Browse files
committed
feat: use babel config file for plugins
1 parent ca0668d commit 84bcca6

File tree

4 files changed

+39
-9
lines changed

4 files changed

+39
-9
lines changed

babel.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
plugins: [
3+
'@babel/plugin-syntax-dynamic-import',
4+
[
5+
'@babel/plugin-transform-runtime',
6+
{
7+
regenerator: true,
8+
},
9+
],
10+
],
11+
};

package-lock.json

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"@babel/plugin-transform-runtime": "^7.4.0",
9595
"@babel/polyfill": "^7.4.0",
9696
"@babel/preset-env": "^7.4.1",
97+
"@babel/runtime": "^7.4.0",
9798
"@commitlint/config-conventional": "^7.5.0",
9899
"@vue/test-utils": "^1.0.0-beta.29",
99100
"autoprefixer": "^9.5.0",

webpack.config.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,22 @@ module.exports = [
6161
{
6262
modules: false,
6363
useBuiltIns: 'entry',
64+
corejs: 3,
6465
targets: {
6566
browsers: Object.values(pkg.browserslist.defaults),
6667
},
6768
},
6869
],
6970
],
70-
plugins: [
71-
'@babel/plugin-syntax-dynamic-import',
72-
// [
73-
// '@babel/plugin-transform-runtime',
74-
// {
75-
// regenerator: true,
76-
// },
77-
// ],
78-
],
71+
// plugins: [
72+
// '@babel/plugin-syntax-dynamic-import',
73+
// // [
74+
// // '@babel/plugin-transform-runtime',
75+
// // {
76+
// // regenerator: true,
77+
// // },
78+
// // ],
79+
// ],
7980
},
8081
},
8182
],

0 commit comments

Comments
 (0)