Repository navigation
Releases
v7.0.0-rc.2
What changed
- Migrated the build pipeline to tsdown, replacing the separate Rolldown and custom Oxc declaration steps.
- Type declarations are now bundled into a single
dist/index.d.ts. - Fixed TypeScript error TS2834 for consumers using
moduleResolution: "node16"or"nodenext"(#229).
No runtime behavior changes are intended. Compatibility checks passed with Vite 5β8 on Node 20.20.0.
Full Changelog: v7.0.0-rc.1...v7.0.0-rc.2
v7.0.0-rc.1
Fixes
- Respect explicit
excludesettings in tsconfig. An explicit array, includingexclude: [], now overrides the defaultoutDirexclusion, matching TypeScript. Previously, files underoutDirwere always excluded from alias resolution.
Maintenance
- Expand regression coverage by comparing resolution and file selection against TypeScript, including checks for Vite query suffixes and cache hits.
- Add manual Vite and Node compatibility smoke checks covering alias resolution in development and production builds with eager and lazy project discovery.
- Replace the
debugdependency with obug.
Known issue
- Document the existing v7 limitation affecting dot-prefixed aliases such as
.storybook/*. Use an alias such as@storybook/*instead; it can still target./.storybook/*. Track the upstream fix in oxc-resolver#1360.
Full changelog: v7.0.0-alpha.3...v7.0.0-rc.1
v7.0.0-alpha.3
What's Changed
- perf: limit how many folders findAllProjects reads at once by @arturovt in #225
- fix: cache resolved paths per importer folder, not just per import name by @arturovt in #226
- fix: free the slot when a limited task throws synchronously by @arturovt in #228
- fix: keep ensureRelative in one path flavor (Windows include/exclude bug) by @arturovt in #227
New Contributors
Full Changelog: v7.0.0-alpha.2...v7.0.0-alpha.3
v7.0.0-alpha.2
What's Changed
- Add provenance-enabled npm releases by @aleclarson in #224
- Support TypeScript 7 without tsconfck by @aleclarson in #223
Full Changelog: v7.0.0-alpha.1...v7.0.0-alpha.2
v7.0.0-alpha.1
This release marks a major modernization of vite-tsconfig-paths, moving to the OXC and Rolldown ecosystem for significantly improved performance and a leaner dependency tree.
Special thanks to Ben Snyder (@benpsnyder) for this massive overhaul!
High-Level Changes
- OXC Resolver Integration: Replaced custom path-matching logic with
oxc-resolver. This handlestsconfigpaths natively in Rust, providing a high-performance resolution pipeline. - Rolldown Ready: Added support for Rolldown-compatible
resolveIdhook filters. This allows skipping unnecessary JS-to-Rust boundary calls for relative imports and virtual modules on supported engines (Vite 6.3+, Rollup 4.38+, and Rolldown). - Toolchain Modernization:
- Switched from
tsupto Rolldown for bundling, reducing transitive dependencies by over 100. - Migrated from Prettier to oxfmt (OXC's formatter).
- Introduced oxlint for fast, type-aware linting.
- Uses oxc-transform for native
.d.tsgeneration viaisolatedDeclarations.
- Switched from
- TypeScript 6.0: Upgraded to TypeScript 6.0 RC, including fixes for new strictness requirements and deprecations.
- Performance Wins: Benchmarks show the new implementation is approximately 1.22x faster on the plugin's own test suite and provides measurable wins in real-world AnalogJS targets.
Breaking Changes & Compatibility
- Node.js >= 18 is now required.
- Vite >= 5.0.0 is now the minimum supported version.
.jsonImport Guard: The guard now applies to all resolutions (including those frompaths), requiring explicit extensions for JSON files if they aren't matched by a specific pattern.- Drop-in Replacement: Despite the internal rewrite, all existing test fixtures pass, and the plugin remains a drop-in replacement for most users.
How to try it
This is an alpha release. You can install it using the next tag:
npm install vite-tsconfig-paths@nextv6.1.0
Features
- New
importerFilteroption: Provides fine-grained control over which files should have their imports resolved by this plugin. (Closes #175, #193) - Ignore
.d.tsoverrides: The plugin now ignores resolutions that point to.d.tsfiles, avoiding issues whentsconfigis used for opt-in type overrides. (Closes #179, #180)
Performance
- Hoisted regular expressions out of the hot path in the resolver for better performance.
Internal
- Added
resolvedToDeclarationFileevent to the debug log file.
v6.0.0
Note: No intentional breaking changes. Major version bump due to extensive internal refactoring; downgrade to v5 if needed.
Highlights
- On-demand tsconfig discovery via
projectDiscovery: "lazy", while eager discovery remains the default. - tsconfig/jsconfig files are watched and reloaded automatically in both modes, including during
vite build --watch. - New
logFileoption for per-import resolution traces (passtrueforvite-tsconfig-paths.logor provide a path). - Support for root
/*aliases and other absolute-style imports. - Support for
.astrofiles whenallowJs/looseis enabled.
Fixes
- More reliable tsconfig watching and resolver refreshes: handles lazy discovery edge cases, recreates resolvers after file changes, tolerates missing directories, and copes better with virtual importers.
- Windows path handling now normalizes drive-letter casing to avoid missed matches (#183).
Upgrade notes
- Install the stable release:
pnpm add -D vite-tsconfig-paths. - Opt into lazy discovery or logging when needed:
import tsconfigPaths from 'vite-tsconfig-paths'
export default {
plugins: [
tsconfigPaths({
projectDiscovery: 'lazy',
logFile: true,
}),
],
}- Rooted path patterns such as
"/*": ["src/*"]now resolve the same way tsserver does.
v6.0.0-beta.4
v6.0.0-beta.3
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.