Commit dbc3947
Bartek Wrona
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 2cfc657 commit dbc3947
1 file changed
+38
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15028 | 15028 | | |
15029 | 15029 | | |
15030 | 15030 | | |
| 15031 | + | |
| 15032 | + | |
| 15033 | + | |
| 15034 | + | |
| 15035 | + | |
| 15036 | + | |
| 15037 | + | |
| 15038 | + | |
| 15039 | + | |
| 15040 | + | |
| 15041 | + | |
| 15042 | + | |
| 15043 | + | |
| 15044 | + | |
| 15045 | + | |
| 15046 | + | |
| 15047 | + | |
| 15048 | + | |
| 15049 | + | |
| 15050 | + | |
| 15051 | + | |
| 15052 | + | |
| 15053 | + | |
| 15054 | + | |
| 15055 | + | |
| 15056 | + | |
| 15057 | + | |
| 15058 | + | |
| 15059 | + | |
| 15060 | + | |
| 15061 | + | |
| 15062 | + | |
| 15063 | + | |
| 15064 | + | |
| 15065 | + | |
| 15066 | + | |
| 15067 | + | |
| 15068 | + | |
15031 | 15069 | | |
15032 | 15070 | | |
15033 | 15071 | | |
| |||
0 commit comments