mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 00:02:03 +00:00
fix(bun): support relative imports without .ts but starting with /u/ or /f/
This commit is contained in:
@@ -32,7 +32,12 @@ const p = {
|
||||
const imports = transpiler.scanImports(code);
|
||||
for (const imp of imports) {
|
||||
if (imp.kind == "import-statement") {
|
||||
if (imp.path.startsWith(".") && !imp.path.endsWith(".ts")) {
|
||||
if (
|
||||
(imp.path.startsWith(".") ||
|
||||
imp.path.startsWith("/u/") ||
|
||||
imp.path.startsWith("/f/")) &&
|
||||
!imp.path.endsWith(".ts")
|
||||
) {
|
||||
code = code.replaceAll(imp.path, imp.path + ".ts");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user