Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Node 20 is the current minimum supported version, and node 20 is
nodenextas of TypeScript 5.8. (TypeScript 5.9 will add an explicitnode20setting. microsoft/TypeScript#61805)https://github.com/microsoft/TypeScript/wiki/Node-Target-Mapping#node-20
https://www.typescriptlang.org/docs/handbook/modules/reference.html#the-module-compiler-option
With this change,
await import()is no longer transpiled into arequire()call, and webpack'sresolve.fallback(which is performed at build time) doesn't seem to work on dynamic imports (maybe it does with some extra configuration...but documentation doesn't say what). Unlike withrequire()webpack trusts that it'll resolve at runtime, so long asasyncChunks: true. So turn async chunks off, unit tests don't need that.(This appears to be an entirely undocumented and convoluted footgun interaction between the configuration options.)
https://webpack.js.org/configuration/output/#outputasyncchunks
https://webpack.js.org/configuration/resolve/
webpack/webpack#18028 (reply in thread)