Skip to content

Commit 06397ef

Browse files
committed
babel 7
1 parent aaef75f commit 06397ef

File tree

6 files changed

+40
-111
lines changed

6 files changed

+40
-111
lines changed

.babelrc

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
{
2-
"presets": [
3-
["env", {
4-
"modules": false,
5-
"targets": {
6-
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7-
}
8-
}],
9-
"stage-2"
10-
],
11-
"plugins": ["transform-vue-jsx", "transform-runtime"]
12-
}
2+
"presets": ["@babel/preset-env"],
3+
"plugins": [
4+
"@babel/plugin-transform-runtime",
5+
"@babel/plugin-syntax-dynamic-import"
6+
]
7+
}

.eslintignore

-4
This file was deleted.

.eslintrc

-12
This file was deleted.

build/devConfig/rules.js

-22
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
1-
const resolve = require('../utils/resolve')
21
const commonRules = require('../commonRules')
32

43
const devRules = [
5-
{
6-
enforce: 'pre',
7-
test: /.(jsx?|vue)$/,
8-
loader: 'eslint-loader',
9-
include: resolve('src'),
10-
exclude: /node_modules/
11-
},
124
{
135
test: /\.styl(us)?$/,
146
use: [
@@ -22,20 +14,6 @@ const devRules = [
2214
},
2315
'stylus-loader'
2416
]
25-
},
26-
{
27-
test: /\.less$/,
28-
use: [
29-
'vue-style-loader',
30-
'css-loader',
31-
{
32-
loader: 'postcss-loader',
33-
options: {
34-
sourceMap: true
35-
}
36-
},
37-
'less-loader'
38-
]
3917
}
4018
]
4119

build/prodConfig/rules.js

-19
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,6 @@ const prodRules = [
2020
},
2121
'stylus-loader'
2222
]
23-
},
24-
{
25-
test: /\.less$/,
26-
use: [
27-
MiniCssExtractPlugin.loader,
28-
{
29-
loader: 'css-loader',
30-
options: {
31-
minimize: true
32-
}
33-
},
34-
{
35-
loader: 'postcss-loader',
36-
options: {
37-
sourceMap: true
38-
}
39-
},
40-
'less-loader'
41-
]
4223
}
4324
]
4425

package.json

+34-43
Original file line numberDiff line numberDiff line change
@@ -21,66 +21,57 @@
2121
"vue": "^2.5.17",
2222
"vue-lazyload": "^1.2.6",
2323
"vue-router": "^3.0.1",
24-
"vuex": "^3.0.1",
25-
"weixin-js-sdk": "^1.3.3"
24+
"vuex": "^3.0.1"
2625
},
2726
"devDependencies": {
28-
"autoprefixer": "^9.1.0",
29-
"babel-core": "^6.26.3",
30-
"babel-eslint": "^8.2.6",
27+
"@babel/core": "^7.1.6",
28+
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
29+
"@babel/plugin-syntax-jsx": "^7.0.0",
30+
"@babel/plugin-transform-runtime": "^7.1.0",
31+
"@babel/preset-env": "^7.1.6",
32+
"@babel/runtime": "^7.1.5",
33+
"autoprefixer": "^9.3.1",
3134
"babel-helper-vue-jsx-merge-props": "^2.0.3",
32-
"babel-loader": "^7.1.5",
35+
"babel-loader": "^8.0.4",
3336
"babel-plugin-syntax-jsx": "^6.18.0",
34-
"babel-plugin-transform-runtime": "^6.23.0",
3537
"babel-plugin-transform-vue-jsx": "^3.7.0",
36-
"babel-preset-env": "^1.7.0",
3738
"babel-preset-stage-2": "^6.24.1",
38-
"compression-webpack-plugin": "^1.1.11",
39-
"copy-webpack-plugin": "^4.5.2",
39+
"compression-webpack-plugin": "^2.0.0",
40+
"copy-webpack-plugin": "^4.6.0",
4041
"cross-env": "^5.2.0",
41-
"css-loader": "^1.0.0",
42-
"cssnano": "^4.0.5",
43-
"cssnano-preset-advanced": "^4.0.0",
44-
"eslint": "^5.3.0",
45-
"eslint-config-standard": "^11.0.0",
46-
"eslint-loader": "^2.1.0",
47-
"eslint-plugin-html": "^4.0.5",
48-
"eslint-plugin-import": "^2.13.0",
49-
"eslint-plugin-node": "^7.0.1",
50-
"eslint-plugin-promise": "^3.8.0",
51-
"eslint-plugin-standard": "^3.1.0",
52-
"file-loader": "^1.1.11",
42+
"css-loader": "^1.0.1",
43+
"cssnano": "^4.1.7",
44+
"cssnano-preset-advanced": "^4.0.5",
45+
"file-loader": "^2.0.0",
5346
"friendly-errors-webpack-plugin": "^1.7.0",
54-
"html-webpack-plugin": "^3.2.0",
55-
"husky": "^0.14.3",
56-
"less": "^3.8.1",
57-
"less-loader": "^4.1.0",
58-
"mini-css-extract-plugin": "^0.4.1",
59-
"node-notifier": "^5.2.1",
60-
"optimize-css-assets-webpack-plugin": "^5.0.0",
61-
"portfinder": "^1.0.16",
47+
"html-webpack-plugin": "^4.0.0-beta.3",
48+
"husky": "^1.1.4",
49+
"mini-css-extract-plugin": "^0.4.4",
50+
"node-notifier": "^5.3.0",
51+
"optimize-css-assets-webpack-plugin": "^5.0.1",
52+
"portfinder": "^1.0.19",
6253
"postcss-aspect-ratio-mini": "0.0.2",
63-
"postcss-import": "^12.0.0",
54+
"postcss-import": "^12.0.1",
6455
"postcss-loader": "^3.0.0",
65-
"postcss-preset-env": "^5.3.0",
56+
"postcss-preset-env": "^6.4.0",
6657
"postcss-px-to-viewport": "0.0.3",
6758
"postcss-url": "^8.0.0",
68-
"postcss-viewport-units": "^0.1.4",
59+
"postcss-viewport-units": "^0.1.6",
6960
"postcss-write-svg": "^3.0.1",
7061
"rimraf": "^2.6.2",
71-
"semver": "^5.5.0",
72-
"style-loader": "^0.22.1",
62+
"semver": "^5.6.0",
63+
"style-loader": "^0.23.1",
7364
"stylus": "^0.54.5",
7465
"stylus-loader": "^3.0.2",
75-
"uglifyjs-webpack-plugin": "^1.2.7",
76-
"url-loader": "^1.0.1",
77-
"vue-loader": "^15.3.0",
78-
"vue-style-loader": "^4.1.1",
66+
"uglifyjs-webpack-plugin": "^2.0.1",
67+
"url-loader": "^1.1.2",
68+
"vue-loader": "^15.4.2",
69+
"vue-style-loader": "^4.1.2",
7970
"vue-template-compiler": "^2.5.17",
80-
"webpack": "^4.16.5",
81-
"webpack-bundle-analyzer": "^2.13.1",
82-
"webpack-cli": "^3.1.0",
83-
"webpack-dev-server": "^3.1.5",
71+
"webpack": "^4.25.1",
72+
"webpack-bundle-analyzer": "^3.0.3",
73+
"webpack-cli": "^3.1.2",
74+
"webpack-dev-server": "^3.1.10",
8475
"webpack-merge": "^4.1.4"
8576
},
8677
"engines": {

0 commit comments

Comments
 (0)