Commit c62836c
Bartek Wrona
fixup! Replace require() with await import() in EXPORT_ES6 shell/runtime files
fixup! Replace require() with await import() in EXPORT_ES6 shell/runtime files
Revert the bundler-hint removal from 548e32d. It was based on a
mistaken assumption that webpack auto-handles `node:`-prefixed dynamic
imports -- it does not. CI run on 548e32d hit:
test_webpack_esm_output_clean:
ERROR in node:fs
Module build failed: UnhandledSchemeError: Reading from "node:fs"
is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
Same error for node:path, node:url. All three show up because without
`/* webpackIgnore: true */`, webpack attempts to resolve the dynamic
import as a module and fails on the unknown scheme.
Vite (per test/vite/vite.config.js) does auto-externalize `node:*` for
browser -- emitting a warning that the config already whitelists --
so strictly speaking `/* @vite-ignore */` is optional. But we keep
both for symmetry and to also silence vite's dynamic-import analysis
noise.
Updates the inline comment to explain the requirement so a future
reader does not attempt the same simplification again.
Addresses and supersedes the response to r3075818347 -- the hints
cannot be removed unless we add a webpack plugin or drop support for
webpack consumers of EXPORT_ES6 output.1 parent 548e32d commit c62836c
1 file changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
965 | | - | |
966 | | - | |
967 | | - | |
968 | | - | |
969 | | - | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
970 | 971 | | |
971 | 972 | | |
972 | 973 | | |
| |||
0 commit comments