TypeScript
TypeScript copied to clipboard
Module resolution: the `moduleResolution` compiler option seems set to be `bundler` when the `module` compiler option is set to `ES6`, `ES2015`, `ES2020`, `ES2022`, or `ESNext`.
Acknowledgement
- [x] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
Comment
The moduleResolution compiler option allows the following values: ~node10~, ~classic~, ~node16~, ~nodenext~, and bundler; its default value is classic when the module compiler option is set to any of CommonJS, Node16, NodeNext, or Preserve as documented.
-
classic, the current default value, is scheduled to be deprecated in TypeScript 6.0. -
node10is only for backwards compatibility and it should also no longer be used. -
node16andnodenextrequires themodulecompiler option to be set toNode16orNodeNextfor error TS5110. -
bundlerseems to be the only possible option by elimination when themodulecompiler option is set toES6,ES2015,ES2020,ES2022, orESNext.
In my opinion, the default value for moduleResolution compiler option needs to change to bundler when the module compiler option is set to any of ES6, ES2015, ES2020, ES2022, or ESNext.