1 Star 0 Fork 37

清风 / vue-zui

forked from AresYe / vue-zui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.prod.config.js 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
AresYe 提交于 2016-09-19 23:30 . 更新至1.0.3
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractPlugin = require('extract-text-webpack-plugin');
var config = require('./webpack.base.config');
var vPath="./src/components/";
config.entry={
"vui":vPath+"vui"
}
config.output={
path: path.join(__dirname, './dist'),
// 文件地址,使用绝对路径形式
filename: '[name].min.js',
//[name]这里是webpack提供的根据路口文件自动生成的名字
publicPath: './',
// 公共文件生成的地址
library: 'vui',
libraryTarget: 'umd'
};
config.devtool="";
config.plugins = (config.plugins || []).concat([
// this allows uglify to strip all warnings
// from Vue.js source code.
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
// This minifies not only JavaScript, but also
// the templates (with html-minifier) and CSS (with cssnano)!
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurenceOrderPlugin()
])
module.exports = config
JavaScript
1
https://gitee.com/VIPhxp/vue-zui.git
git@gitee.com:VIPhxp/vue-zui.git
VIPhxp
vue-zui
vue-zui
master

搜索帮助