Commit 8b2fb1c
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 88d7ed2 commit 8b2fb1c
2 files changed
+49
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14991 | 14991 | | |
14992 | 14992 | | |
14993 | 14993 | | |
| 14994 | + | |
| 14995 | + | |
| 14996 | + | |
| 14997 | + | |
| 14998 | + | |
| 14999 | + | |
| 15000 | + | |
| 15001 | + | |
| 15002 | + | |
| 15003 | + | |
| 15004 | + | |
| 15005 | + | |
| 15006 | + | |
| 15007 | + | |
| 15008 | + | |
| 15009 | + | |
| 15010 | + | |
| 15011 | + | |
| 15012 | + | |
| 15013 | + | |
| 15014 | + | |
| 15015 | + | |
| 15016 | + | |
| 15017 | + | |
| 15018 | + | |
| 15019 | + | |
| 15020 | + | |
| 15021 | + | |
| 15022 | + | |
| 15023 | + | |
| 15024 | + | |
| 15025 | + | |
| 15026 | + | |
| 15027 | + | |
| 15028 | + | |
| 15029 | + | |
| 15030 | + | |
14994 | 15031 | | |
14995 | 15032 | | |
14996 | 15033 | | |
| |||
| 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