Skip to content

Commit 6460d3b

Browse files
committed
Remove all exports from transpiled typescript
1 parent 95f45ba commit 6460d3b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,15 @@ fn main() {
3030
let transpiled_code = transpiled_code
3131
.replace(
3232
"import * as ReqlangExpr from \"@reqlang-expr-tspl/runtime\";",
33-
&JSRUNTIME_SOURCE,
33+
&JSRUNTIME_SOURCE.replace("export ", ""),
3434
)
3535
.replace(&REQLANG_OBJ_PREFIX, "")
36-
.replace("import arg from \"arg\";", ARG_SOURCE);
36+
.replace(
37+
"import arg from \"arg\";",
38+
&ARG_SOURCE
39+
.replace("module.exports = arg;", "")
40+
.replace("export ", ""),
41+
);
3742

3843
println!(
3944
"// @ts-nocheck\n/*\n{ARG_LICENSE}\n*/\n/*\n{LICENSE}\n*/\n{}",

0 commit comments

Comments
 (0)