diff --git a/packages/core/src/plugins/rsdoctor.ts b/packages/core/src/plugins/rsdoctor.ts index 3ce626749c..92c31d3153 100644 --- a/packages/core/src/plugins/rsdoctor.ts +++ b/packages/core/src/plugins/rsdoctor.ts @@ -62,7 +62,7 @@ export const pluginRsdoctor = (): RsbuildPlugin => ({ let module: RsdoctorExports; try { - const modulePath = pathToFileURL(packagePath).href; + const modulePath = pathToFileURL(packagePath).pathname; module = await import(modulePath); } catch (err) { logger.error(