Releases: aleclarson/vite-tsconfig-paths
v6.0.0-beta.4
v6.0.0-beta.3
- Added support for
/*path aliases. (#101)
v6.0.0-beta.2
-
Added a new
logFileoption.
PasslogFile: trueand the plugin will create avite-tsconfig-paths.logfile in your working directory.Using
DEBUG=vite-tsconfig-pathsin 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 newlogFileoption. 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 usingprojectDiscovery: "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.
ThebuildStarthook will reset the plugin whenever it's called.
v6.0.0-beta.1
-
Added a new
projectDiscoveryoption.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
configNamesarray 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
projectsarray 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 theprojectsoption will not interfere with lazy project discovery.
v5.1.4
v5.1.3
v5.1.2
v5.1.1
v5.1.0
- Add
skipoption 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
importerpath before callingthis.resolvein theirresolveIdhooks (#157) - Allow both tsconfig.json and jsconfig.json in the same directory (4124b09)
v5.0.0
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.