Commit d068717
Add bundler integration tests verifying EXPORT_ES6 output has no require()
Add two tests that verify EXPORT_ES6 output is valid ESM and works with
bundlers:
- test_webpack_esm_output_clean: Compiles with EXPORT_ES6 and default
environment (web+node), then builds with webpack. On main, webpack
hard-fails because it cannot resolve 'node:module' (used by emscripten's
createRequire polyfill). This breaks any webpack/Next.js/Nuxt project.
- test_vite_esm_output_clean: Compiles with EXPORT_ES6 and default
environment, then builds with vite. On main, vite externalizes
'node:module' for browser compatibility, emitting a warning. The
resulting bundle contains code referencing unavailable node modules.
These tests are expected to fail on main and pass after eliminating
require() from EXPORT_ES6 output.1 parent 92cf3c4 commit d068717
2 files changed
+49
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15053 | 15053 | | |
15054 | 15054 | | |
15055 | 15055 | | |
| 15056 | + | |
| 15057 | + | |
| 15058 | + | |
| 15059 | + | |
| 15060 | + | |
| 15061 | + | |
| 15062 | + | |
| 15063 | + | |
| 15064 | + | |
| 15065 | + | |
| 15066 | + | |
| 15067 | + | |
| 15068 | + | |
| 15069 | + | |
| 15070 | + | |
| 15071 | + | |
| 15072 | + | |
| 15073 | + | |
| 15074 | + | |
| 15075 | + | |
| 15076 | + | |
| 15077 | + | |
| 15078 | + | |
| 15079 | + | |
| 15080 | + | |
| 15081 | + | |
| 15082 | + | |
| 15083 | + | |
| 15084 | + | |
| 15085 | + | |
| 15086 | + | |
| 15087 | + | |
| 15088 | + | |
| 15089 | + | |
| 15090 | + | |
| 15091 | + | |
| 15092 | + | |
15056 | 15093 | | |
15057 | 15094 | | |
15058 | 15095 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
3 | 15 | | |
0 commit comments