Skip to content

Commit

Permalink
fix: improve handling of virtual modules (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Dec 27, 2023
1 parent 84bbd25 commit 3d25618
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ function collectCss(mod: ModuleNode, styleUrls: Set<string>, visitedModules: Set
// - I believe some Vite plugins don't respect the \0 virtual module convention. What should we do then?
// - https://github.com/vikejs/vike/issues/1327
// - https://github.com/vikejs/vike/commit/3f7b9916dddc84e29e2c20d2b0df7211b6f1acbd
styleUrls.add(`/@id/${mod.url.substring(1)}`)
// - https://github.com/vikejs/vike/issues/479#issuecomment-1870043943
styleUrls.add(`/@id/__x00__${mod.url.substring(1)}`)
} else {
// Is this useful? Maybe for virtual modules that don't respect the \0 virtual module convention?
styleUrls.add(`/@id/${mod.url}`)
Expand Down

0 comments on commit 3d25618

Please sign in to comment.