update web

This commit is contained in:
fatedier
2018-05-16 02:51:02 +08:00
parent c4f873c07a
commit 0b0d5c982e
16 changed files with 2249 additions and 2012 deletions

View File

@ -1,6 +1,7 @@
const path = require('path')
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var VueLoaderPlugin = require('vue-loader/lib/plugin')
var url = require('url')
var publicPath = ''
@ -25,7 +26,7 @@ module.exports = (options = {}) => ({
module: {
rules: [{
test: /\.vue$/,
use: ['vue-loader']
loader: 'vue-loader'
}, {
test: /\.js$/,
use: ['babel-loader'],
@ -71,7 +72,19 @@ module.exports = (options = {}) => ({
new HtmlWebpackPlugin({
favicon: 'src/assets/favicon.ico',
template: 'src/index.html'
})
}),
new webpack.NormalModuleReplacementPlugin(/element-ui[\/\\]lib[\/\\]locale[\/\\]lang[\/\\]zh-CN/, 'element-ui/lib/locale/lang/en'),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new VueLoaderPlugin()
],
devServer: {
host: '127.0.0.1',