TypeScript · Middle · Question 44 of 75
How does moduleResolution: 'bundler' differ from 'node16'/'nodenext'?
- ✓Correct answer:
bundlerworks like bundlers do,nodenextfollows Node.js rules - 2
bundlerworks only with Webpack 4 and older - 3They're synonyms for different TS versions
Explanation
In Node.js ESM you must write extensions in relative imports and account for exports/type. Bundlers (Vite, Next.js, esbuild) are forgiving about this, and bundler mode mirrors their behavior. For code run by Node.js without a build step, choose nodenext.