Skip to content

Commit

Permalink
fix(inline-svg): use POSIX path separator in generated source typings
Browse files Browse the repository at this point in the history
  • Loading branch information
vnphanquang committed Oct 4, 2024
1 parent a4abc1f commit b7e69fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/witty-cows-notice.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@svelte-put/inline-svg': patch
---

make sure path separator is in POSIX format when generating source typings (fixes 320)
2 changes: 1 addition & 1 deletion packages/inline-svg/src/vite/internals.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}'`);
}
}
Expand Down

0 comments on commit b7e69fe

Please sign in to comment.