赞
踩
在package.json里面是script加入脚本"publish": " webpack --config webpack.publish.config.js -p"
编写webpack.publish.config.jsconst webpack=require("webpack");
const path = require('path');
const node_modules = path.resolve(__dirname, 'node_modules');
const UglifyJsPlugin = webpack.optimize.UglifyJsPlugin;
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const HtmlwebpackPlugin=require("html-webpack-plugin");
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = {
entry: {
app:path.resolve(__dirname,'src/main.js'),
vendors:['vue']
},
output: {
path: path.resolve(__dirname, 'dist/app'),
filename: 'static/js/[name].js',
},
modu
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。