Skip to content

Commit 3c24403

Browse files
committed
webpack: Fix relative image URLs
1 parent 0c1549e commit 3c24403

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

webpack/webpack-common.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ const FONT_REGEX = new RegExp(`${FONT_DIR}/.*\\.(woff)$`)
3535
const TMPL_REGEX = new RegExp(`${TMPL_DIR}/.*\\.(html|json|js)$`)
3636

3737

38-
function escapeForLess(s) {
39-
return `~"${s}"`
40-
}
41-
4238
function requireFromDir(regex, path, excludeRegex) {
4339
let filePaths = glob.sync(path + '/**')
4440

@@ -67,13 +63,14 @@ function makeLessRule({type, theme, isProduction, appName, appFullPath, quiFullP
6763
loader: 'less-loader',
6864
options: {
6965
lessOptions: {
66+
relativeUrls: false,
7067
globalVars: {
7168
qui_theme: theme,
7269
app_img_path: appImgPath,
7370
app_font_path: appFontPath,
74-
qui_img_path: escapeForLess(quiImgPath),
75-
qui_font_path: escapeForLess(quiFontPath),
76-
qui_less_path: escapeForLess(quiLessPath)
71+
qui_img_path: quiImgPath,
72+
qui_font_path: quiFontPath,
73+
qui_less_path: quiLessPath
7774
}
7875
}
7976
}

0 commit comments

Comments
 (0)