Skip to content

Commit 719dcea

Browse files
committed
build: upgrade babel to v7
1 parent 3511377 commit 719dcea

File tree

4 files changed

+17
-31
lines changed

4 files changed

+17
-31
lines changed

.babelrc

Lines changed: 0 additions & 23 deletions
This file was deleted.

karma.conf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
const path = require('path');
21
const webpackConfig = require('./webpack.config');
32

43
delete webpackConfig.entry;

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
},
3939
"homepage": "https://github.com/PeachScript/vue-infinite-loading",
4040
"devDependencies": {
41+
"@babel/core": "^7.0.0",
42+
"@babel/plugin-transform-runtime": "^7.0.0",
43+
"@babel/preset-env": "^7.0.0",
44+
"@babel/runtime": "^7.0.0",
4145
"@commitlint/cli": "^7.0.0",
4246
"@commitlint/config-conventional": "^7.0.1",
4347
"autoprefixer": "^9.1.5",
44-
"babel-core": "^6.25.0",
45-
"babel-loader": "^7.1.1",
46-
"babel-plugin-istanbul": "^4.1.4",
47-
"babel-plugin-transform-runtime": "^6.23.0",
48-
"babel-preset-env": "^1.6.0",
49-
"babel-preset-stage-2": "^6.24.1",
48+
"babel-loader": "^8.0.2",
49+
"babel-plugin-istanbul": "^5.0.1",
5050
"chai": "^3.5.0",
5151
"css-loader": "^0.28.4",
5252
"eslint": "^4.19.1",

webpack.config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,17 @@ module.exports = {
3434
{
3535
test: /\.js$/,
3636
include: [path.join(__dirname, './src'), path.join(__dirname, './test')],
37-
loader: 'babel-loader'
37+
loader: 'babel-loader',
38+
options: {
39+
presets: ['@babel/preset-env'],
40+
plugins: ['@babel/plugin-transform-runtime'],
41+
env: {
42+
test: {
43+
presets: [['@babel/preset-env', { useBuiltIns: 'usage' }]],
44+
plugins: ['babel-plugin-istanbul']
45+
}
46+
}
47+
}
3848
},
3949
{
4050
test: /\.vue$/,

0 commit comments

Comments
 (0)