Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit43bbc3c

Browse files
committed
fix: 解决图片作为背景引入时,路径不对的问题
1 parent8ed6c2c commit43bbc3c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

‎template/build/config/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module.exports = {
1919
* then assetsPublicPath should be set to "/bar/".
2020
* In most cases please use '/' !!!
2121
*/
22-
assetsPublicPath:'/',
22+
assetsPublicPath:'',
2323

2424
/**
2525
* Source Maps

‎template/build/utils.js‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,15 @@ exports.cssLoaders = function (options) {
5252
// Extract CSS when that option is specified
5353
// (which is the case during production build)
5454
if(options.extract){
55-
loaders.push(MiniCssExtractPlugin.loader)
55+
loaders.push({
56+
loader:MiniCssExtractPlugin.loader,
57+
options:{
58+
// you can specify a publicPath here
59+
// by default it use publicPath in webpackOptions.output
60+
// 解决图片作为背景引入时,路径不对的问题
61+
publicPath:'../../'
62+
}
63+
})
5664
}else{
5765
loaders.push('vue-style-loader')
5866
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp