npm vite-tsconfig-paths 4.0.0

latest releases: 5.1.4, 5.1.3, 5.1.2...
2 years ago
  • Stop using the tsconfig-paths package
    It is better to let Vite handle all of the resolving, so that this plugin can be only responsible for the path mapping.

    At the same time, I am also adding the tsconfck package, which handles the loading of tsconfig.json files for us. This package is also used in Vite core (we should have Vite expose it in the future, to avoid the duplication).

    The tsconfig-paths package was previously responsible for config loading and much of the path resolving logic, but now we can ditch it! I'm also ditching the recrawl-sync package, which was used for crawling the filesystem in search of tsconfig.json files.

  • Remove the extensions option
    Since the file resolution is delegated to Vite core, this option is no longer necessary.

  • Add the parseNative option
    The tsconfck package has a parseNative function that's able to delegate config loading to the TypeScript compiler. If you encounter a bug in tsconfig.json file loading, you can try passing parseNative: true to see if that helps. But you should avoid enabling it otherwise, since it has a noticeable performance cost (up to 600ms roughly speaking).

Don't miss a new vite-tsconfig-paths release

NewReleases is sending notifications on new releases.