Skip to content

Commit 6de8b18

Browse files
authored
Merge branch 'next' into dev
2 parents 1cbc9f6 + ef33295 commit 6de8b18

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+4692
-2056
lines changed

.babelrc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
{
2-
"presets": [["es2015", { "loose": true }]],
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"loose": true,
7+
"modules": false,
8+
"targets": {
9+
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
10+
}
11+
}
12+
],
13+
"stage-2"
14+
],
315
"plugins": ["transform-vue-jsx"],
416
"env": {
517
"utils": {
@@ -11,6 +23,9 @@
1123
}
1224
}]
1325
]
26+
},
27+
"test": {
28+
"plugins": ["istanbul"]
1429
}
1530
}
1631
}

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"no-restricted-globals": ["error", "event", "fdescribe"]
1313
},
1414
"parserOptions": {
15+
"ecmaVersion": 6,
1516
"ecmaFeatures": {
16-
"experimentalObjectRestSpread": true,
1717
"jsx": true
1818
}
1919
}

build/bin/build-entry.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if (typeof window !== 'undefined' && window.Vue) {
4949
install(window.Vue);
5050
}
5151
52-
module.exports = {
52+
export default {
5353
version: '{{version}}',
5454
locale: locale.use,
5555
i18n: locale.i18n,
@@ -58,8 +58,6 @@ module.exports = {
5858
Loading,
5959
{{list}}
6060
};
61-
62-
module.exports.default = module.exports;
6361
`;
6462

6563
delete Components.font;

build/webpack.common.js

Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
const path = require('path');
2-
const webpack = require('webpack');
32
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
3+
const VueLoaderPlugin = require('vue-loader/lib/plugin');
44

55
const config = require('./config');
66

77
module.exports = {
8+
mode: 'production',
89
entry: {
910
app: ['./src/index.js']
1011
},
@@ -21,6 +22,15 @@ module.exports = {
2122
modules: ['node_modules']
2223
},
2324
externals: config.externals,
25+
performance: {
26+
hints: false
27+
},
28+
stats: {
29+
children: false
30+
},
31+
optimization: {
32+
minimize: false
33+
},
2434
module: {
2535
rules: [
2636
{
@@ -33,13 +43,11 @@ module.exports = {
3343
test: /\.vue$/,
3444
loader: 'vue-loader',
3545
options: {
36-
preserveWhitespace: false
46+
compilerOptions: {
47+
preserveWhitespace: false
48+
}
3749
}
3850
},
39-
{
40-
test: /\.json$/,
41-
loader: 'json-loader'
42-
},
4351
{
4452
test: /\.css$/,
4553
loaders: ['style-loader', 'css-loader', 'postcss-loader']
@@ -49,27 +57,7 @@ module.exports = {
4957
loaders: ['style-loader', 'css-loader', 'sass-loader']
5058
},
5159
{
52-
test: /\.html$/,
53-
loader: 'html-loader?minimize=false'
54-
},
55-
{
56-
test: /\.otf|ttf|woff2?|eot(\?\S*)?$/,
57-
loader: 'url-loader',
58-
query: {
59-
limit: 10000,
60-
name: path.posix.join('static', '[name].[hash:7].[ext]')
61-
}
62-
},
63-
{
64-
test: /\.svg(\?\S*)?$/,
65-
loader: 'url-loader',
66-
query: {
67-
limit: 10000,
68-
name: path.posix.join('static', '[name].[hash:7].[ext]')
69-
}
70-
},
71-
{
72-
test: /\.(gif|png|jpe?g)(\?\S*)?$/,
60+
test: /\.(svg|otf|ttf|woff2?|eot|gif|png|jpe?g)(\?\S*)?$/,
7361
loader: 'url-loader',
7462
query: {
7563
limit: 10000,
@@ -80,11 +68,6 @@ module.exports = {
8068
},
8169
plugins: [
8270
new ProgressBarPlugin(),
83-
new webpack.DefinePlugin({
84-
'process.env.NODE_ENV': JSON.stringify('production')
85-
}),
86-
new webpack.LoaderOptionsPlugin({
87-
minimize: true
88-
})
71+
new VueLoaderPlugin()
8972
]
9073
};

build/webpack.component.js

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
const path = require('path');
2-
const webpack = require('webpack');
32
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
3+
const VueLoaderPlugin = require('vue-loader/lib/plugin');
44

55
const Components = require('../components.json');
66
const config = require('./config');
77

88
const webpackConfig = {
9+
mode: 'production',
910
entry: Components,
1011
output: {
1112
path: path.resolve(process.cwd(), './lib'),
@@ -20,6 +21,13 @@ const webpackConfig = {
2021
modules: ['node_modules']
2122
},
2223
externals: config.externals,
24+
performance: {
25+
hints: false
26+
},
27+
stats: 'none',
28+
optimization: {
29+
minimize: false
30+
},
2331
module: {
2432
rules: [
2533
{
@@ -32,13 +40,11 @@ const webpackConfig = {
3240
test: /\.vue$/,
3341
loader: 'vue-loader',
3442
options: {
35-
preserveWhitespace: false
43+
compilerOptions: {
44+
preserveWhitespace: false
45+
}
3646
}
3747
},
38-
{
39-
test: /\.json$/,
40-
loader: 'json-loader'
41-
},
4248
{
4349
test: /\.css$/,
4450
loaders: ['style-loader', 'css-loader', 'postcss-loader']
@@ -48,27 +54,7 @@ const webpackConfig = {
4854
loaders: ['style-loader', 'css-loader', 'sass-loader']
4955
},
5056
{
51-
test: /\.html$/,
52-
loader: 'html-loader?minimize=false'
53-
},
54-
{
55-
test: /\.otf|ttf|woff2?|eot(\?\S*)?$/,
56-
loader: 'url-loader',
57-
query: {
58-
limit: 10000,
59-
name: path.posix.join('static', '[name].[hash:7].[ext]')
60-
}
61-
},
62-
{
63-
test: /\.svg(\?\S*)?$/,
64-
loader: 'url-loader',
65-
query: {
66-
limit: 10000,
67-
name: path.posix.join('static', '[name].[hash:7].[ext]')
68-
}
69-
},
70-
{
71-
test: /\.(gif|png|jpe?g)(\?\S*)?$/,
57+
test: /\.(svg|otf|ttf|woff2?|eot|gif|png|jpe?g)(\?\S*)?$/,
7258
loader: 'url-loader',
7359
query: {
7460
limit: 10000,
@@ -79,12 +65,7 @@ const webpackConfig = {
7965
},
8066
plugins: [
8167
new ProgressBarPlugin(),
82-
new webpack.DefinePlugin({
83-
'process.env.NODE_ENV': JSON.stringify('production')
84-
}),
85-
new webpack.LoaderOptionsPlugin({
86-
minimize: true
87-
})
68+
new VueLoaderPlugin()
8869
]
8970
};
9071

build/webpack.conf.js

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
const path = require('path');
2-
const webpack = require('webpack');
32
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
3+
const VueLoaderPlugin = require('vue-loader/lib/plugin');
44

55
const config = require('./config');
66

77
module.exports = {
8+
mode: 'production',
89
entry: {
910
app: ['./src/index.js']
1011
},
@@ -24,6 +25,12 @@ module.exports = {
2425
externals: {
2526
vue: config.vue
2627
},
28+
performance: {
29+
hints: false
30+
},
31+
stats: {
32+
children: false
33+
},
2734
module: {
2835
rules: [
2936
{
@@ -36,13 +43,11 @@ module.exports = {
3643
test: /\.vue$/,
3744
loader: 'vue-loader',
3845
options: {
39-
preserveWhitespace: false
46+
compilerOptions: {
47+
preserveWhitespace: false
48+
}
4049
}
4150
},
42-
{
43-
test: /\.json$/,
44-
loader: 'json-loader'
45-
},
4651
{
4752
test: /\.css$/,
4853
loaders: ['style-loader', 'css-loader', 'postcss-loader']
@@ -52,27 +57,7 @@ module.exports = {
5257
loaders: ['style-loader', 'css-loader', 'sass-loader']
5358
},
5459
{
55-
test: /\.html$/,
56-
loader: 'html-loader?minimize=false'
57-
},
58-
{
59-
test: /\.otf|ttf|woff2?|eot(\?\S*)?$/,
60-
loader: 'url-loader',
61-
query: {
62-
limit: 10000,
63-
name: path.posix.join('static', '[name].[hash:7].[ext]')
64-
}
65-
},
66-
{
67-
test: /\.svg(\?\S*)?$/,
68-
loader: 'url-loader',
69-
query: {
70-
limit: 10000,
71-
name: path.posix.join('static', '[name].[hash:7].[ext]')
72-
}
73-
},
74-
{
75-
test: /\.(gif|png|jpe?g)(\?\S*)?$/,
60+
test: /\.(svg|otf|ttf|woff2?|eot|gif|png|jpe?g)(\?\S*)?$/,
7661
loader: 'url-loader',
7762
query: {
7863
limit: 10000,
@@ -83,20 +68,6 @@ module.exports = {
8368
},
8469
plugins: [
8570
new ProgressBarPlugin(),
86-
new webpack.DefinePlugin({
87-
'process.env.NODE_ENV': JSON.stringify('production')
88-
}),
89-
new webpack.optimize.UglifyJsPlugin({
90-
compress: {
91-
warnings: false
92-
},
93-
output: {
94-
comments: false
95-
},
96-
sourceMap: false
97-
}),
98-
new webpack.LoaderOptionsPlugin({
99-
minimize: true
100-
})
71+
new VueLoaderPlugin()
10172
]
10273
};

0 commit comments

Comments
 (0)