Skip to content

Releases

v7.0.0-rc.2

v7.0.0-rc.2 Pre-release
Pre-release

Choose a tag to compare

@aleclarson aleclarson released this 11 Sep 16:33

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

v7.0.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@aleclarson aleclarson released this 11 Sep 00:27

Fixes

  • Respect explicit exclude settings in tsconfig. An explicit array, including exclude: [], now overrides the default outDir exclusion, matching TypeScript. Previously, files under outDir were 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 debug dependency 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

v7.0.0-alpha.3 Pre-release
Pre-release

Choose a tag to compare

@aleclarson aleclarson released this 28 Aug 01:14

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

v7.0.0-alpha.2 Pre-release
Pre-release

Choose a tag to compare

@aleclarson aleclarson released this 27 Aug 22:21

What's Changed

Full Changelog: v7.0.0-alpha.1...v7.0.0-alpha.2

v7.0.0-alpha.1

v7.0.0-alpha.1 Pre-release
Pre-release

Choose a tag to compare

@aleclarson aleclarson released this 29 Mar 18:51

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 handles tsconfig paths natively in Rust, providing a high-performance resolution pipeline.
  • Rolldown Ready: Added support for Rolldown-compatible resolveId hook 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 tsup to 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.ts generation via isolatedDeclarations.
  • 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.
  • .json Import Guard: The guard now applies to all resolutions (including those from paths), 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@next

v6.1.0

Choose a tag to compare

@aleclarson aleclarson released this 07 Feb 15:40

Features

  • New importerFilter option: Provides fine-grained control over which files should have their imports resolved by this plugin. (Closes #175, #193)
  • Ignore .d.ts overrides: The plugin now ignores resolutions that point to .d.ts files, avoiding issues when tsconfig is 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 resolvedToDeclarationFile event to the debug log file.

v6.0.0

Choose a tag to compare

@aleclarson aleclarson released this 14 Dec 22:13

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 logFile option for per-import resolution traces (pass true for vite-tsconfig-paths.log or provide a path).
  • Support for root /* aliases and other absolute-style imports.
  • Support for .astro files when allowJs/loose is 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.4 Pre-release
Pre-release

Choose a tag to compare

@aleclarson aleclarson released this 01 Aug 03:07
  • fix(windows): ensure drive letter is uppercase (#183)
  • feat: add .astro to JS-like extension regex (fbbc8ed)

v6.0.0-beta.3

v6.0.0-beta.3 Pre-release
Pre-release

Choose a tag to compare

@aleclarson aleclarson released this 16 Apr 19:28
  • Added support for /* path aliases. (#101)

v6.0.0-beta.2

v6.0.0-beta.2 Pre-release
Pre-release

Choose a tag to compare

@aleclarson aleclarson released this 16 Apr 18:58
  • 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.