diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets
index 9f3e488d2ac97..3fa6fc6ccda12 100644
--- a/src/mono/wasm/build/WasmApp.Native.targets
+++ b/src/mono/wasm/build/WasmApp.Native.targets
@@ -255,7 +255,7 @@
<_EmccLDFlags Include="$(EmccLinkOptimizationFlag)" />
<_EmccLDFlags Include="@(_EmccCommonFlags)" />
- <_EmccLDFlags Include="-s EXPORT_ES6=1" />
+ <_EmccLDFlags Include="-s EXPORT_ES6=1 -lexports.js" />
<_EmccLDFlags Condition="'$(WasmEnableExceptionHandling)' != 'false'" Include="-s EXPORT_EXCEPTION_HANDLING_HELPERS=1" />
<_DriverCDependencies Include="$(_WasmPInvokeHPath);$(_WasmICallTablePath)" />
diff --git a/src/mono/wasm/wasm.proj b/src/mono/wasm/wasm.proj
index d741533a23825..1e349920cf35e 100644
--- a/src/mono/wasm/wasm.proj
+++ b/src/mono/wasm/wasm.proj
@@ -374,7 +374,8 @@
$(CMakeConfigurationEmccFlags) -s ASSERTIONS=1
-O2
- $(CMakeConfigurationLinkFlags) -s EXPORT_ES6=1
+
+ $(CMakeConfigurationLinkFlags) -s EXPORT_ES6=1 -lexports.js
$(CMakeConfigurationLinkFlags) -msimd128
$(CMakeConfigurationLinkFlags) -Wno-pthreads-mem-growth
$(CMakeConfigurationLinkFlags) --emit-symbol-map