坑1. 用webpack打包后访问index.html出现资源加载404问题解决方案:config中index.js中,build对象中的assetsPublicPath属性的层级需要由 ‘/’ 调整为 ./ 1 build: { 2 env: require(./p ...
坑1. 用webpack打包后访问index.html出现资源加载404问题
解决方案:config中index.js中,build对象中的assetsPublicPath属性的层级需要由 ‘/’ 调整为 './'
1 build: { 2 env: require('./prod.env'), 3 index: path.resolve(__dirname, '../dist/index.html'), 4 assetsRoot: path.resolve(__dirname, '../dist'), 5 assetsSubDirectory: 'static', 6 assetsPublicPath: './', 7 productionSourceMap: false,12 productionGzip: false,13 productionGzipExtensions: ['js', 'css'],18 bundleAnalyzerReport: process.env.npm_config_report19 }
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:vue项目实战爬坑小记001
关键词:VUE
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。