Skip to content

Commit

Permalink
update lastest config webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
tungquach committed Sep 8, 2019
1 parent 1f8d9b5 commit 734e0bf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
9 changes: 5 additions & 4 deletions docs/demo.build.js

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions docs/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var path = require('path')
var webpack = require('webpack')
const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports = {
entry: './docs/demo.js',
Expand Down Expand Up @@ -83,6 +84,9 @@ module.exports = {
noInfo: true,
overlay: true
},
plugins: [
new VueLoaderPlugin()
],
performance: {
hints: false
},
Expand All @@ -91,19 +95,14 @@ module.exports = {

if (process.env.NODE_ENV === 'production') {
module.exports.devtool = false
module.exports.mode = process.env.NODE_ENV
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
Expand Down
7 changes: 1 addition & 6 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,14 @@ module.exports = {

if (process.env.NODE_ENV === 'production') {
module.exports.devtool = false
module.exports.mode = process.env.NODE_ENV
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: false,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
Expand Down

0 comments on commit 734e0bf

Please sign in to comment.