Skip to content

Commit

Permalink
Relativize imports of auto-generated modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpap committed Jun 17, 2020
1 parent c25709e commit d116dd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bokehjs/src/compiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ export function default_transformers(options: ts.CompilerOptions): ts.CustomTran
const module_file = join(base, module_path)
if (ts.sys.fileExists(module_file) ||
ts.sys.fileExists(module_file + ".ts") ||
ts.sys.fileExists(join(module_file, "index.ts"))) {
ts.sys.fileExists(join(module_file, "index.ts")) ||
options.outDir != null && ts.sys.fileExists(join(options.outDir, module_path + ".js"))) {
const rel_path = normalize(relative(dirname(file), module_file))
return rel_path.startsWith(".") ? rel_path : `./${rel_path}`
}
Expand Down

0 comments on commit d116dd3

Please sign in to comment.