@itemconsulting/preset-enonic-xp
Advanced tools
Comparing version
@@ -8,3 +8,4 @@ import { getHashDigest } from "loader-utils"; | ||
.join("\n"); | ||
return `${requires}\nexport default "${escapePathForWindows(getPathRelativeToResources(this.resourcePath))}"; /* hash=${getHashDigest(source)} */`; | ||
// Don't escape for Windows. The exported path is intended for URLs | ||
return `${requires}\nexport default "${getPathForURLs(getPathRelativeToResources(this.resourcePath))}"; /* hash=${getHashDigest(source)} */`; | ||
} | ||
@@ -14,1 +15,4 @@ function escapePathForWindows(path) { | ||
} | ||
function getPathForURLs(path) { | ||
return path.replace(/\\/g, "/"); | ||
} |
@@ -8,3 +8,3 @@ import { getHashDigest } from "loader-utils"; | ||
.join("\n"); | ||
return `${requires}\nexport default "${escapePathForWindows(getPathRelativeToResources(this.resourcePath))}"; /* hash=${getHashDigest(source)} */`; | ||
return `${requires}\nexport default "${getPathForURLs(getPathRelativeToResources(this.resourcePath))}"; /* hash=${getHashDigest(source)} */`; | ||
} | ||
@@ -14,1 +14,4 @@ function escapePathForWindows(path) { | ||
} | ||
function getPathForURLs(path) { | ||
return path.replace(/\\/g, "/"); | ||
} |
{ | ||
"name": "@itemconsulting/preset-enonic-xp", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Preset for using Storybook with Enonic XP", | ||
@@ -10,3 +10,3 @@ "main": "dist/index.js", | ||
"build": "tsc -p .", | ||
"lint": "eslint --cache 'src/**/*.ts'", | ||
"lint": "eslint --cache --fix 'src/**/*.ts'", | ||
"prepublishOnly": "npm run build" | ||
@@ -25,10 +25,10 @@ }, | ||
"devDependencies": { | ||
"eslint": "^9.10.0", | ||
"eslint": "^9.17.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.2.1", | ||
"prettier": "^3.3.3", | ||
"typescript": "^5.6.2", | ||
"typescript-eslint": "^8.5.0", | ||
"webpack": "^5.94.0" | ||
"prettier": "^3.4.2", | ||
"typescript": "^5.7.2", | ||
"typescript-eslint": "^8.18.1", | ||
"webpack": "^5.97.1" | ||
} | ||
} |
6426
3.36%89
8.54%