diff --git a/.changeset/witty-cows-notice.md b/.changeset/witty-cows-notice.md new file mode 100644 index 00000000..fdf53825 --- /dev/null +++ b/.changeset/witty-cows-notice.md @@ -0,0 +1,5 @@ +--- +'@svelte-put/inline-svg': patch +--- + +make sure path separator is in POSIX format when generating source typings (fixes 320) diff --git a/packages/inline-svg/src/vite/internals.js b/packages/inline-svg/src/vite/internals.js index 68086e8b..eacd0fb1 100644 --- a/packages/inline-svg/src/vite/internals.js +++ b/packages/inline-svg/src/vite/internals.js @@ -36,7 +36,7 @@ export function generateSourceTyping(sources, config, out) { for (const dir of directories) { const files = findSvgRecursively(dir); for (const file of files) { - const svg = path.relative(dir, file).replace('.svg', ''); + let svg = path.posix.relative(dir, file).replace('.svg', ''); svgs.add(`'${svg}'`); } }