Skip to content

Commit 288e845

Browse files
authored
feat: don't export runtime by default for stub runtime (#23)
1 parent 65a3711 commit 288e845

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/loader/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ function loader(this: any, buffer: Buffer) {
4747
// default options
4848
// when user imports wasm with webassembly type, it's not possible to pass env
4949
runtime: module.type?.startsWith("webassembly") ? "stub" : "incremental",
50-
exportRuntime: !module.type?.startsWith("webassembly"),
50+
exportRuntime:
51+
!module.type?.startsWith("webassembly") &&
52+
userAscOptions.exportRuntime !== "stub",
5153
debug: this.mode === "development",
5254
optimizeLevel: 3,
5355
shrinkLevel: 1,

0 commit comments

Comments
 (0)