diff --git a/client/config-overrides.js b/client/config-overrides.js index 53ef3908..2ea9da5d 100644 --- a/client/config-overrides.js +++ b/client/config-overrides.js @@ -22,7 +22,9 @@ const replaceBaseUrl = (compiler) => { if (info.content.indexOf(BASE_URL_PLACEHOLDER) >= 0) { if (/\.css$/.exec(info.targetPath)) { // For CSS 'url(...)' import we can use relative import - const relPath = path.relative(path.dirname(info.targetPath), info.outputPath); + const relPath = path + .relative(path.dirname(info.targetPath), info.outputPath) + .replace(/\\/g, '/'); replaceInFile(info.targetPath, BASE_URL_PLACEHOLDER, `${relPath}/`); } else if (/\.js$/.exec(info.targetPath)) { // For JS 'import ... from "some-asset"' we can get the variable injected in the window object