diff --git a/src/inject.ts b/src/inject.ts index e8ecb1f47..e3fdd478f 100644 --- a/src/inject.ts +++ b/src/inject.ts @@ -56,7 +56,7 @@ export default async function inject( const generator = new Generator({ env, inputMap, - baseUrl: cwdUrl, + baseUrl: new URL('.', new URL(htmlFile, `${pathToFileURL(process.cwd())}/`)), mapUrl: getInputMapUrl(flags), resolutions: getResolutions(flags), })