Skip to content

Commit

Permalink
[labs/eleventy-plugin-lit] Use file URLs for resolved module paths (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
augustjk committed Aug 6, 2022
1 parent 0162fba commit 2346231
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-wasps-exercise.md
@@ -0,0 +1,5 @@
---
'@lit-labs/eleventy-plugin-lit': patch
---

Use file urls for resolved module paths for Windows compatibility
5 changes: 3 additions & 2 deletions packages/labs/eleventy-plugin-lit/src/index.ts
Expand Up @@ -5,6 +5,7 @@
*/

import * as path from 'path';
import {pathToFileURL} from 'url';
import {Worker} from 'worker_threads';
import type {Message} from './worker/types.js';

Expand Down Expand Up @@ -208,8 +209,8 @@ module.exports = {
return;
}

const resolvedComponentModules = componentModules.map((module) =>
path.resolve(process.cwd(), module)
const resolvedComponentModules = componentModules.map(
(module) => pathToFileURL(path.resolve(process.cwd(), module)).href
);

switch (mode) {
Expand Down

0 comments on commit 2346231

Please sign in to comment.