The module and moduleResolution settings are compiler options, and thus must be part of the compilerOptions object to take effect. NodeNext and Node16 are the only correct module options for code intended to run in Node.js 12+.
node16 and nodenext are the only correct module options for all apps and libraries that are intended to run in Node.js v12 or later, whether they use ES modules or not.
Note: the option values are case-insensitive, and I used the casing matching the JSON schema and suggested by VS Code.
The
module
andmoduleResolution
settings are compiler options, and thus must be part of thecompilerOptions
object to take effect.NodeNext
andNode16
are the only correctmodule
options for code intended to run in Node.js 12+.Per the documentation: 1
Note: the option values are case-insensitive, and I used the casing matching the JSON schema and suggested by VS Code.