ezolenko / rollup-plugin-typescript2

Rollup plugin for typescript with compiler errors.
MIT License
819 stars 71 forks source link

Support TS 5.0 `ModuleResolutionKind` #439

Closed xaviergonz closed 1 year ago

xaviergonz commented 1 year ago

Summary

Add support for TS5.0 by using ModuleResolutionKind.Node10 if ModuleResolutionKind.NodeJs is not found Fixes #436

Details

TS5 renamed ModuleResolutionKind.NodeJs to Node10, so the first one returns undefined, which actually means Classic module resolution

I had to use as any for it to compile. If this project ever uses TS5 as devDependency then the as any will probably need to be reversed.

xaviergonz commented 1 year ago

it works with the final version

agilgur5 commented 1 year ago

Fixed upstream in https://github.com/microsoft/TypeScript/issues/53131 / https://github.com/microsoft/TypeScript/pull/53139