File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -643,17 +643,18 @@ export async function main(argv, options) {
643643
644644 // Include entry files
645645 for ( let i = 0 , k = argv . length ; i < k ; ++ i ) {
646- const filename = argv [ i ] ;
647- let sourcePath = String ( filename )
648- . replace ( / \\ / g, "/" )
649- . replace ( extension_re , "" )
650- . replace ( / [ \\ / ] $ / , "" ) ;
646+ const filename = String ( argv [ i ] ) ;
651647
652648 // Setting the path to relative path
653- sourcePath = path . isAbsolute ( sourcePath )
654- ? path . relative ( baseDir , sourcePath ) . replace ( / \\ / g , "/" )
655- : sourcePath ;
649+ let sourcePath = path . isAbsolute ( filename )
650+ ? path . relative ( baseDir , filename )
651+ : path . normalize ( filename ) ;
656652
653+ sourcePath = sourcePath
654+ . replace ( / \\ / g, "/" )
655+ . replace ( extension_re , "" )
656+ . replace ( / \/ $ / , "" ) ;
657+
657658 // Try entryPath.ext, then entryPath/index.ext
658659 let sourceText = await readFile ( sourcePath + extension , baseDir ) ;
659660 if ( sourceText == null ) {
You can’t perform that action at this time.
0 commit comments