-
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.