File tree 1 file changed +9
-8
lines changed
crates/cli-support/src/js
1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -616,6 +616,15 @@ impl<'a> Context<'a> {
616
616
if self . config . emit_start {
617
617
self . add_start_function ( ) ?;
618
618
has_start_function = self . unstart_start_function ( ) ;
619
+
620
+ // In the "we're pretending to be an ES module use case if we've got
621
+ // a start function then we use an injected shim to actually execute
622
+ // the real start function on the next tick of the microtask queue
623
+ // (explained above)
624
+ if !self . config . no_modules && has_start_function {
625
+ self . inject_start_shim ( ) ;
626
+ }
627
+
619
628
}
620
629
621
630
self . export_table ( ) ?;
@@ -787,14 +796,6 @@ impl<'a> Context<'a> {
787
796
} ,
788
797
)
789
798
} else {
790
- // In the "we're pretending to be an ES module use case if we've got
791
- // a start function then we use an injected shim to actually execute
792
- // the real start function on the next tick of the microtask queue
793
- // (explained above)
794
- if has_start_function {
795
- self . inject_start_shim ( ) ;
796
- }
797
-
798
799
let import_wasm = if self . globals . len ( ) == 0 {
799
800
String :: new ( )
800
801
} else if self . use_node_require ( ) {
You can’t perform that action at this time.
0 commit comments