File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,9 @@ if (!mapFilePath || !distDirPath) {
4141}
4242
4343const distDir = path . resolve ( process . cwd ( ) , distDirPath )
44- const mapFile = await import ( path . resolve ( process . cwd ( ) , mapFilePath ) )
44+ let mapFilePathAbs = path . resolve ( process . cwd ( ) , mapFilePath )
45+ if ( process . platform === 'win32' ) mapFilePathAbs = 'file://' + mapFilePathAbs // On Windows, absolute paths must be valid file:// URLs
46+ const mapFile = await import ( mapFilePathAbs )
4547
4648// Determine the blueprints that are being built
4749let sources = mapFile . BlueprintEntrypoints
Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ if (!mapFilePath) {
2727 process . exit ( 1 )
2828}
2929
30- const absolutePath = path . resolve ( process . cwd ( ) , mapFilePath )
31- const mapFile = await import ( absolutePath )
30+ let mapFilePathAbs = path . resolve ( process . cwd ( ) , mapFilePath )
31+ if ( process . platform === 'win32' ) mapFilePathAbs = 'file://' + mapFilePathAbs // On Windows, absolute paths must be valid file:// URLs
32+ const mapFile = await import ( mapFilePathAbs )
3233if ( ! mapFile ) {
3334 console . error ( `Failed to load map file: ${ absolutePath } ` )
3435 process . exit ( 1 )
You can’t perform that action at this time.
0 commit comments