diff --git a/.changeset/shy-wasps-exercise.md b/.changeset/shy-wasps-exercise.md new file mode 100644 index 0000000000..cfc04baef0 --- /dev/null +++ b/.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 diff --git a/packages/labs/eleventy-plugin-lit/src/index.ts b/packages/labs/eleventy-plugin-lit/src/index.ts index 4150628813..47baea3e90 100644 --- a/packages/labs/eleventy-plugin-lit/src/index.ts +++ b/packages/labs/eleventy-plugin-lit/src/index.ts @@ -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'; @@ -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) {