多级路径
config/index.js
build: {
index: path.resolve(__dirname, '../appweb/frReport/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../appweb/frReport'),
assetsSubDirectory: 'static',
assetsPublicPath: './',
背景图片路径
build/utils.js
加上 publicPath: ‘…/…/’
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader',
publicPath: '../../'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
文章详细描述了如何在webpack配置文件中处理多级路径,特别是在`config/index.js`和`build/utils.js`中设定`index.html`的位置,`assetsRoot`,`assetsSubDirectory`以及`publicPath`等关键路径参数。同时,文章还讲解了如何在使用ExtractTextPlugin时设置`publicPath`来正确处理背景图片路径。
6395

被折叠的 条评论
为什么被折叠?



