cleaned up prod, dev, and run for webpack
This commit is contained in:
parent
1f49050d69
commit
9b89df3d4b
1401
YTManager/frontend/package-lock.json
generated
1401
YTManager/frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "DumbYTManger",
|
"name": "dumbytmanager",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"description": "Front end for the DumbYT Manager project",
|
"description": "Front end for the DumbYT Manager project",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
@ -12,14 +12,18 @@
|
|||||||
"style-loader": "^0.20.2",
|
"style-loader": "^0.20.2",
|
||||||
"ts-loader": "^4.0.0",
|
"ts-loader": "^4.0.0",
|
||||||
"typescript": "^2.7.2",
|
"typescript": "^2.7.2",
|
||||||
|
"uglifyjs-webpack-plugin": "^1.2.2",
|
||||||
"vue": "^2.5.13",
|
"vue": "^2.5.13",
|
||||||
"vue-loader": "^14.1.1",
|
"vue-loader": "^14.1.1",
|
||||||
"vue-template-compiler": "^2.5.13",
|
"vue-template-compiler": "^2.5.13",
|
||||||
"webpack": "^4.0.1",
|
"webpack": "^4.0.1",
|
||||||
"webpack-cli": "^2.0.9"
|
"webpack-cli": "^2.0.9",
|
||||||
|
"webpack-dev-server": "^3.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"start": "webpack-dev-server --mode development --open",
|
||||||
|
"dev": "webpack --mode development",
|
||||||
|
"build": "webpack --mode production",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,8 +42,8 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
use: [
|
use: [
|
||||||
'style-loader',
|
'style-loader',
|
||||||
'css-loader'
|
'css-loader'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -63,24 +63,3 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
devtool: '#eval-source-map'
|
devtool: '#eval-source-map'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
|
||||||
module.exports.devtool = '#source-map'
|
|
||||||
// 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: true,
|
|
||||||
compress: {
|
|
||||||
warnings: false
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
new webpack.LoaderOptionsPlugin({
|
|
||||||
minimize: true
|
|
||||||
})
|
|
||||||
])
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user