Skip to content

Commit 1867165

Browse files
committed
remove minimized version. #41
The bundle in dist folder always minimized.
1 parent 031f9b0 commit 1867165

File tree

2 files changed

+7
-38
lines changed

2 files changed

+7
-38
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"main": "dist/vue-form-generator.js",
77
"scripts": {
88
"prebuild": "npm run test",
9-
"build": "webpack --config webpack.build.config.js",
9+
"build": "webpack --progress -p --config webpack.build.config.js",
1010
"dev": "webpack-dev-server --config webpack.dev.config.js --inline --hot --content-base dev/",
1111
"lint": "eslint --ext=.js,.vue src test/unit/specs",
1212
"coverall": "cat ./test/unit/coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
@@ -33,7 +33,6 @@
3333
},
3434
"files": [
3535
"dist/vue-form-generator.js",
36-
"dist/vue-form-generator.min.js",
3736
"dist/vue-form-generator.css",
3837
"src"
3938
],

webpack.build.config.js

+6-36
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,17 @@ module.exports = [
2727
},
2828

2929
plugins: [
30-
new webpack.optimize.DedupePlugin(),
3130
new webpack.DefinePlugin({
3231
'process.env' : {
3332
NODE_ENV : JSON.stringify('production')
3433
}
3534
}),
35+
new webpack.optimize.UglifyJsPlugin({
36+
compress: {
37+
warnings: false
38+
}
39+
}),
40+
new webpack.optimize.DedupePlugin(),
3641
new webpack.BannerPlugin(banner, {
3742
raw: true
3843
}),
@@ -58,41 +63,6 @@ module.exports = [
5863
resolve: {
5964
packageAlias: 'browser'
6065
}
61-
},
62-
63-
{
64-
entry: "./src/index",
65-
output: {
66-
path: "./dist",
67-
filename: "vue-form-generator.min.js",
68-
library: "VueFormGenerator",
69-
libraryTarget: "umd"
70-
},
71-
plugins: [
72-
new webpack.optimize.UglifyJsPlugin({
73-
compress: {
74-
warnings: false
75-
}
76-
}),
77-
new webpack.optimize.DedupePlugin(),
78-
new webpack.DefinePlugin({
79-
'process.env' : {
80-
NODE_ENV : JSON.stringify('production')
81-
}
82-
}),
83-
new webpack.BannerPlugin(banner, {
84-
raw: true
85-
})
86-
],
87-
88-
module: {
89-
loaders: loaders
90-
},
91-
92-
resolve: {
93-
packageAlias: 'browser'
94-
}
95-
9666
}
9767

9868
];

0 commit comments

Comments
 (0)