diff --git a/src/mono/wasm/build/WasmApp.Native.targets b/src/mono/wasm/build/WasmApp.Native.targets
index 438ea50f3fd176..e7048c15f0e741 100644
--- a/src/mono/wasm/build/WasmApp.Native.targets
+++ b/src/mono/wasm/build/WasmApp.Native.targets
@@ -254,7 +254,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 6ed392341e6b66..c2abb13c95b5f7 100644
--- a/src/mono/wasm/wasm.proj
+++ b/src/mono/wasm/wasm.proj
@@ -372,7 +372,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