Switch to use nodenext module resolution
This better enforces that imports end with a file extension and also use relative paths
It seems required to set option module to NodeNext. But if we set "module": "NodeNext" the tsc will generate export {} at the end of the file in preload.js which results in error syntax since electron does not support esm in sandboxed preload script.
It seems required to set option
moduletoNodeNext.But if we set"module": "NodeNext"the tsc will generateexport {}at the end of the file inpreload.jswhich results in error syntax since electron does not support esm in sandboxed preload script.
Yes, thats a bug that I reported but was closed as "works as intended": https://github.com/microsoft/TypeScript/issues/60074
It seems required to set option
moduletoNodeNext.But if we set"module": "NodeNext"the tsc will generateexport {}at the end of the file inpreload.jswhich results in error syntax since electron does not support esm in sandboxed preload script.Yes, thats a bug that I reported but was closed as "works as intended": microsoft/TypeScript#60074
Even if you don't use an import statement when the module is set to NodeNext in tsconfig.json it still generates export {} at the end of the file.
TS suggested add "moduleDetection": "legacy" which I think prevents export from being generated in non module files
This change also depend on merging #237989 to removed an old test file
While you're in here, can you drop the use of paths? It's only a couple of mistakenly left over JSDoc comments that still use that, as far as I can tell.
Would be great if this could move along 👍
While you're in here, can you drop the use of
paths? It's only a couple of mistakenly left over JSDoc comments that still use that, as far as I can tell.
Sent #238475.