Skip to content

Support resolution for user based importers using allowImporterRe option (e.g. when using SSR vite-node or vite v6 environments API runner)#193

Closed
MDReal32 wants to merge 2 commits intoaleclarson:masterfrom
MDReal32:master
Closed

Support resolution for user based importers using allowImporterRe option (e.g. when using SSR vite-node or vite v6 environments API runner)#193
MDReal32 wants to merge 2 commits intoaleclarson:masterfrom
MDReal32:master

Conversation

@MDReal32
Copy link
Copy Markdown

No description provided.

	•	add allowImporterRe option to PluginOptions for regex-based importer filtering
	•	prioritize allowImporterRe when computing importerExtRE in resolver logic
	•	document new option with JSDoc explaining its use in large/segmented workspaces

This allows consumers to restrict which modules can act as importers during path resolution using a single regular expression, enabling finer-grained control in complex monorepos or selectively-scoped setups.
@aleclarson aleclarson closed this in d0ad01c Feb 7, 2026
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Feb 8, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | vite-tsconfig-paths | 6.0.5 | 6.1.0 |


## [v6.1.0](https://github.com/aleclarson/vite-tsconfig-paths/releases/tag/v6.1.0)

##### Features

- **New `importerFilter` option:** Provides fine-grained control over which files should have their imports resolved by this plugin. (Closes [#175](aleclarson/vite-tsconfig-paths#175), [#193](aleclarson/vite-tsconfig-paths#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](aleclarson/vite-tsconfig-paths#179), [#180](aleclarson/vite-tsconfig-paths#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.
renovate Bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Feb 8, 2026
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | vite-tsconfig-paths | 6.0.5 | 6.1.0 |


## [v6.1.0](https://github.com/aleclarson/vite-tsconfig-paths/releases/tag/v6.1.0)

##### Features

- **New `importerFilter` option:** Provides fine-grained control over which files should have their imports resolved by this plugin. (Closes [#175](aleclarson/vite-tsconfig-paths#175), [#193](aleclarson/vite-tsconfig-paths#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](aleclarson/vite-tsconfig-paths#179), [#180](aleclarson/vite-tsconfig-paths#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant