Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tolerate resolveId calls with win32-style importer path #157

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

lisonge
Copy link
Contributor

@lisonge lisonge commented Sep 15, 2024

when vite-tsconfig-paths work with other plugins on windows

the parameter importer of resolveId hook can be windows path and includes \ char

that will cause const resolvers = resolversByDir[projectDir] get undefined


it should fix some error like Rollup failed to resolve import on windows

https://github.com/aleclarson/vite-tsconfig-paths/issues?q=is%3Aissue+Rollup+failed+to+resolve+import

other detail see lisonge/vite-plugin-monkey#186 (comment)

@aleclarson aleclarson changed the title fix: when projectDir inculdes '\' char on windows fix: tolerate resolveId calls with win32-style importer path Nov 4, 2024
@aleclarson aleclarson merged commit 152687a into aleclarson:master Nov 4, 2024
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 5, 2024
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | vite-tsconfig-paths | 5.0.1 | 5.1.0 |


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

-   Add `skip` option for adding additional directories to be skipped when searching for tsconfig.json files ([#146](aleclarson/vite-tsconfig-paths#146))
-   Fix path resolution on Windows when other Vite plugins neglect to normalize the `importer` path before calling `this.resolve` in their `resolveId` hooks ([#157](aleclarson/vite-tsconfig-paths#157))
-   Allow both tsconfig.json and jsconfig.json in the same directory ([`4124b09`](aleclarson/vite-tsconfig-paths@4124b09))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 6, 2024
| datasource | package             | from  | to    |
| ---------- | ------------------- | ----- | ----- |
| npm        | vite-tsconfig-paths | 5.0.1 | 5.1.0 |


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

-   Add `skip` option for adding additional directories to be skipped when searching for tsconfig.json files ([#146](aleclarson/vite-tsconfig-paths#146))
-   Fix path resolution on Windows when other Vite plugins neglect to normalize the `importer` path before calling `this.resolve` in their `resolveId` hooks ([#157](aleclarson/vite-tsconfig-paths#157))
-   Allow both tsconfig.json and jsconfig.json in the same directory ([`4124b09`](aleclarson/vite-tsconfig-paths@4124b09))
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.

2 participants