eclipse-thingweb / eclipse-thingweb/node-wot
Update module and moduleResolution in tsconfig.json?
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 100
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
https://stackoverflow.com/a/71473145 provides some good input w.r.t. to `module` and `moduleResolution`.
At the moment we have the following settings
https://github.com/eclipse-thingweb/node-wot/blob/8dc6ed8d7a7fd24ef97d703c018a5ec1cd76481a/tsconfig.json#L5-L6
and possible settings are
```
Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015', 'es2020', 'es2022', 'esnext', 'node16', 'node18', 'nodenext', 'preserve'.
Argument for '--moduleResolution' option must be: 'node10', 'classic', 'node16', 'nodenext', 'bundler'.
```
`nodenext` does not seem feasible since it is a "floating" or bleeding-edge option. Useful to set the module emit version at least to '`node18`'?
What is the advantage of using `es` variants, see https://blog.logrocket.com/commonjs-vs-es-modules-node-js/
Contributor guide
Assessment
This issue has not been assessed yet.