1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00

fix: Fix paths in css files when building on windows

This commit is contained in:
Maksim Eltyshev 2023-02-22 19:59:40 +01:00
parent 13f26b4be1
commit 8dd331b895

View file

@ -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