Skip to content

Commit

Permalink
Relativize imports of auto-generated modules (#10188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpap committed Jun 18, 2020
1 parent 8d8f7e5 commit 1e8c39c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bokehjs/src/compiler/compiler.ts
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 1e8c39c

Please sign in to comment.