当前位置:   article > 正文

vue打包放到Java项目里_【vue】webpack打包vue项目并且运行在Tomcat里面

java web和h vue打包

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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/715375
推荐阅读
相关标签
  

闽ICP备14008679号