Skip to content

Commit

Permalink
[labs/ssr] Use url module to convert file url to path (#3204)
Browse files Browse the repository at this point in the history
  • Loading branch information
augustjk committed Aug 6, 2022
1 parent 2346231 commit 19d7bd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/wild-ladybugs-flash.md
@@ -0,0 +1,5 @@
---
'@lit-labs/ssr': patch
---

Use `url` module to parse file URL to path for Windows compatibility
2 changes: 1 addition & 1 deletion packages/labs/ssr/src/lib/module-loader.ts
Expand Up @@ -131,7 +131,7 @@ export class ModuleLoader {
if (moduleURL.protocol !== 'file:') {
throw new Error(`Unsupported protocol: ${moduleURL.protocol}`);
}
const modulePath = moduleURL.pathname;
const modulePath = fileURLToPath(moduleURL);

// Look in the cache
let moduleRecord = this.cache.get(modulePath);
Expand Down

0 comments on commit 19d7bd2

Please sign in to comment.