mirror of
https://github.com/plankanban/planka.git
synced 2025-12-18 17:23:21 +03:00
fix: Fix paths in css files when building on windows
This commit is contained in:
@@ -22,7 +22,9 @@ const replaceBaseUrl = (compiler) => {
|
|||||||
if (info.content.indexOf(BASE_URL_PLACEHOLDER) >= 0) {
|
if (info.content.indexOf(BASE_URL_PLACEHOLDER) >= 0) {
|
||||||
if (/\.css$/.exec(info.targetPath)) {
|
if (/\.css$/.exec(info.targetPath)) {
|
||||||
// For CSS 'url(...)' import we can use relative import
|
// 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}/`);
|
replaceInFile(info.targetPath, BASE_URL_PLACEHOLDER, `${relPath}/`);
|
||||||
} else if (/\.js$/.exec(info.targetPath)) {
|
} else if (/\.js$/.exec(info.targetPath)) {
|
||||||
// For JS 'import ... from "some-asset"' we can get the variable injected in the window object
|
// For JS 'import ... from "some-asset"' we can get the variable injected in the window object
|
||||||
|
|||||||
Reference in New Issue
Block a user