vue部署在域名的非根目录下
2020-01-20 本文已影响0人
yqz_
1.修改config/index.js中assetsPublicPath的值
assetsPublicPath: '/voice_gzh/',
2.修改build/webpack.prod.conf.js下的output的配置
output: {
publicPath:'/voice_gzh/',
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},