Skip to content

Releases: aleclarson/vite-tsconfig-paths

v6.0.0-beta.4

01 Aug 03:07
Compare
Choose a tag to compare
v6.0.0-beta.4 Pre-release
Pre-release
  • fix(windows): ensure drive letter is uppercase (#183)
  • feat: add .astro to JS-like extension regex (fbbc8ed)

v6.0.0-beta.3

16 Apr 19:28
Compare
Choose a tag to compare
v6.0.0-beta.3 Pre-release
Pre-release
  • Added support for /* path aliases. (#101)

v6.0.0-beta.2

16 Apr 18:58
Compare
Choose a tag to compare
v6.0.0-beta.2 Pre-release
Pre-release
  • Added a new logFile option.
    Pass logFile: true and the plugin will create a vite-tsconfig-paths.log file in your working directory.

    Using DEBUG=vite-tsconfig-paths in the past has worked pretty well, but it isn't always the most readable. In v6 and above, this plugin will still have debug logs using this approach, but module resolution will only be logged through the new logFile option. The log file will be comprehensive (as in, every import that vite-tsconfig-paths receives will be logged). If an import goes unhandled by this plugin, the reason will be logged. If an import is resolved, the resolved path and the tsconfig path are both logged. In fact, every possible code path (in the context of module resolution) is logged to the log file.

  • Universal support for tsconfig reloading.
    Whether you're using projectDiscovery: "lazy" or eager loading, this plugin should now be able to watch and reload tsconfig files when you make changes to them. This feature hasn't been rigorously tested yet. Please report issues you come across.

  • Support for vite build --watch.
    The buildStart hook will reset the plugin whenever it's called.

v6.0.0-beta.1

16 Apr 03:04
Compare
Choose a tag to compare
v6.0.0-beta.1 Pre-release
Pre-release
  • Added a new projectDiscovery option.

    When this option is set to "lazy", tsconfig files will be loaded on-demand. When an import is resolved, the parent directories of the importer are searched for tsconfig files matching the configNames array option (which defaults to ["tsconfig.json", "jsconfig.json"]).

    If using TypeScript’s project references, you can ensure they are discovered by adding the main project to the projects array option of this plugin. Though, this is only necessary if you’re referencing tsconfig files with non-standard names (e.g. "tsconfig.src.json"). Setting the projects option will not interfere with lazy project discovery.

v5.1.4

06 Dec 16:28
Compare
Choose a tag to compare
  • fix: correctly infer the paths root dir (eea1c17) (#150)

v5.1.3

19 Nov 20:53
Compare
Choose a tag to compare
  • fix: Once an importer is matched, end directory traversal (b0d8ecb)
  • feat: Add vite-tsconfig-paths:resolve debug logs (7160d6e)
  • chore: Ensure debug logs can be enabled in vitest (0dc9a8b)

v5.1.2

10 Nov 16:56
Compare
Choose a tag to compare
  • fix Windows regression introduced in v5.1.1 (#162)

v5.1.1

10 Nov 16:56
Compare
Choose a tag to compare
  • support ${configDir} syntax in include/exclude (#156)

v5.1.0

04 Nov 17:27
Compare
Choose a tag to compare
  • Add skip option for adding additional directories to be skipped when searching for tsconfig.json files (#146)
  • Fix path resolution on Windows when other Vite plugins neglect to normalize the importer path before calling this.resolve in their resolveId hooks (#157)
  • Allow both tsconfig.json and jsconfig.json in the same directory (4124b09)

v5.0.0

07 Aug 22:51
Compare
Choose a tag to compare

This package is now ESM only in order to align with Vite: https://vitejs.dev/guide/migration#deprecate-cjs-node-api

If your project is using CommonJS, you can rename your Vite config to use the .mjs or .mts extension (depending on whether you use TypeScript or not). If you're not using Vite v5.0.0+, you may want to pin your dependency to v4 of this plugin.