Skip to content

Commit

Permalink
Merge branch 'main' into cjs-deps
Browse files Browse the repository at this point in the history
  • Loading branch information
rturnq authored Apr 13, 2023
2 parents 4a97488 + 597770a commit 8e748a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/grumpy-books-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/vite": patch
---

Fix resolving files from virtual files (eg inline stylesheets).
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ export default function markoPlugin(opts: Options = {}): vite.Plugin[] {
from,
dep
) => {
const query = `${virtualFileQuery}&id=${normalizePath(dep.virtualPath)}`;
const query = `${virtualFileQuery}&id=${encodeURIComponent(
normalizePath(dep.virtualPath)
)}`;
const normalizedFrom = normalizePath(from);
const id = normalizePath(normalizedFrom) + query;

Expand Down

0 comments on commit 8e748a4

Please sign in to comment.