vue打包后static下的json文件没有单独出现,打包后的文件可以正常运行,我想打包后可以修改这个文件

const resolve = require("path").resolve;
var webpack = require('webpack')
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
entry:{
app: './src/main.js'
},
output: {
path: resolve(__dirname, './dist'),
publicPath: process.env.NODE_ENV != 'production' ?'':'./',
chunkFilename: "CWL_[id].js?[chunkhash]",
filename: process.env.NODE_ENV === 'production' ? "[name].js?[chunkhash]" : "[name].js",
},
module: {
rules: [
{
test: /.css$/,
use: [
'vue-style-loader',
'css-loader'
]
},
{
test: /.less$/,
use:['style-loader','css-loader','less-loader']
},
{
test: /.vue$/,
loader: 'vue-loader',
options: {
loaders: {
}
// other vue-loader options go here
}
},
{
test: /.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /.(png|jpg|jpeg|gif|eot|ttf|woff|woff2|svg|svgz)(\?.+)?$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
}
]
},
plugins: [
// new webpack.optimize.CommonsChunkPlugin({
// names: ["vendor", "manifest"]
// }),
new HtmlWebpackPlugin({
template: "index.html",favicon:'static/favicon.ico'
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
],
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
},
extensions: ['*', '.js', '.vue', '.json']
},
devServer: {
port:9889,
host:'192.168.50.107',
proxy: {
'/api/': {
target: '',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}
},
},
performance: {
hints: false
},
devtool: process.env.NODE_ENV != 'production'? "#eval-source-map" : "#source"
}
图片说明

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问