@@ -5,7 +5,7 @@ import { SourceNode } from "source-map";
55import * as ts from "typescript" ;
66import { CompilerOptions , isBundleEnabled , LuaTarget } from "../CompilerOptions" ;
77import { getLuaLibBundle } from "../LuaLib" ;
8- import { assert , cast , isNonNull , trimExtension } from "../utils" ;
8+ import { assert , cast , isNonNull , normalizeSlashes , trimExtension } from "../utils" ;
99import { Chunk , modulesToBundleChunks , modulesToChunks } from "./chunk" ;
1010import { createResolutionErrorDiagnostic } from "./diagnostics" ;
1111import { buildModule , Module } from "./module" ;
@@ -88,7 +88,7 @@ export class Transpilation {
8888 const result = this . resolver . resolveSync ( { } , path . dirname ( issuer ) , request ) ;
8989 assert ( typeof result === "string" , `Invalid resolution result: ${ result } ` ) ;
9090 // https://github.com/webpack/enhanced-resolve#escaping
91- resolvedPath = result . replace ( / \0 # / g, "#" ) ;
91+ resolvedPath = normalizeSlashes ( result . replace ( / \0 # / g, "#" ) ) ;
9292 } catch ( error ) {
9393 if ( ! isResolveError ( error ) ) throw error ;
9494 return { error : error . message } ;
@@ -98,6 +98,10 @@ export class Transpilation {
9898 if ( ! module ) {
9999 if ( ! resolvedPath . endsWith ( ".lua" ) ) {
100100 const messageText = `Resolved source file '${ resolvedPath } ' is not a part of the project.` ;
101+ console . log (
102+ resolvedPath ,
103+ this . modules . map ( m => m . request )
104+ ) ;
101105 return { error : messageText } ;
102106 }
103107
0 commit comments