Skip to content

Conversation

@bluwy
Copy link
Member

@bluwy bluwy commented Oct 12, 2025

Description

Use subpath imports instead of link: and rolldown config tweaks, so it works well with the thing I'm working on 😬 but I think relying on subpath imports feels more proper than link: anyways.

Copy link
Contributor

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change alone makes sense to me, but it's better to know what's coming as side benefit 🙂 Is it isolated declaration?

@bluwy
Copy link
Member Author

bluwy commented Oct 14, 2025

I'm working on a tool for the declaration files, and it would make the configuration easier if we didn't need a post build step to fix the types/* import.

The biggest benefit now is that there's lesser custom plugin logic for to maintain, and should result in lesser code too (ignoring the lockfile due to #20919)

Otherwise I also agree that this is one of those "sure.." changes, especially since the upcoming changes I'd like to bring also needs some discussion I think 😅

@sapphi-red sapphi-red added the p1-chore Doesn't change code behavior (priority) label Oct 14, 2025
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Would you resolve the conflict and update the comment in packages/vite/src/node/__tests__/plugins/importGlob/fixture-a/index.ts?

@hi-ogawa
Copy link
Contributor

/ecosystem-ci run

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 15, 2025

Open in StackBlitz

npm i https://pkg.pr.new/vite@20921

commit: 1f16d6a

@vite-ecosystem-ci
Copy link

@sapphi-red sapphi-red merged commit d0094af into main Oct 15, 2025
21 checks passed
@sapphi-red sapphi-red deleted the subpath-types branch October 15, 2025 01:50
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 20, 2025
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | vite    | 7.1.10 | 7.1.11 |


## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small)

##### Bug Fixes

- **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5))

##### Miscellaneous Chores

- **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2))

##### Code Refactoring

- use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af))

##### Build System

- remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce))
- remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 23, 2025
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | vite    | 7.1.10 | 7.1.12 |


## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12)

Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details.


## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small)

##### Bug Fixes

- **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5))

##### Miscellaneous Chores

- **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2))

##### Code Refactoring

- use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af))

##### Build System

- remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce))
- remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Oct 26, 2025
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | vite    | 7.1.10 | 7.1.12 |


## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12)

Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details.


## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small)

##### Bug Fixes

- **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5))

##### Miscellaneous Chores

- **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2))

##### Code Refactoring

- use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af))

##### Build System

- remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce))
- remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 1, 2025
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | vite    | 7.1.10 | 7.1.12 |


## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12)

Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details.


## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small)

##### Bug Fixes

- **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5))

##### Miscellaneous Chores

- **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2))

##### Code Refactoring

- use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af))

##### Build System

- remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce))
- remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 3, 2025
| datasource | package | from   | to     |
| ---------- | ------- | ------ | ------ |
| npm        | vite    | 7.1.10 | 7.1.12 |


## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12)

Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details.


## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small)

##### Bug Fixes

- **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5))

##### Miscellaneous Chores

- **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2))

##### Code Refactoring

- use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af))

##### Build System

- remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce))
- remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 8, 2025
| datasource | package | from   | to    |
| ---------- | ------- | ------ | ----- |
| npm        | vite    | 7.1.10 | 7.2.2 |


## [v7.2.2](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-722-2025-11-07-small)

##### Bug Fixes

- revert "refactor: use fs.cpSync ([#21019](vitejs/vite#21019))" ([#21081](vitejs/vite#21081)) ([728c8ee](vitejs/vite@728c8ee))


## [v7.2.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-721-2025-11-06-small)

##### Bug Fixes

- **worker:** some worker asset was missing ([#21074](vitejs/vite#21074)) ([82d2d6c](vitejs/vite@82d2d6c))

##### Code Refactoring

- **build:** rename `indexOfMatchInSlice` to `findPreloadMarker` ([#21054](vitejs/vite#21054)) ([f83264f](vitejs/vite@f83264f))


## [v7.2.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#720-2025-11-05)

##### Bug Fixes

- **css:** fallback to sass when sass-embedded platform binary is missing ([#21002](vitejs/vite#21002)) ([b1fd616](vitejs/vite@b1fd616))
- **module-runner:** make `getBuiltins` response JSON serializable ([#21029](vitejs/vite#21029)) ([ad5b3bf](vitejs/vite@ad5b3bf))
- **types:** add undefined to optional properties for exactOptionalProperties type compatibility ([#21040](vitejs/vite#21040)) ([2833c55](vitejs/vite@2833c55))

##### Miscellaneous Chores

- **deps:** update rolldown-related dependencies ([#21047](vitejs/vite#21047)) ([e3a6a83](vitejs/vite@e3a6a83))


## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12)

Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details.


## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small)

##### Bug Fixes

- **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5))

##### Miscellaneous Chores

- **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2))

##### Code Refactoring

- use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af))

##### Build System

- remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce))
- remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 8, 2025
| datasource | package | from   | to    |
| ---------- | ------- | ------ | ----- |
| npm        | vite    | 7.1.10 | 7.2.2 |


## [v7.2.2](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-722-2025-11-07-small)

##### Bug Fixes

- revert "refactor: use fs.cpSync ([#21019](vitejs/vite#21019))" ([#21081](vitejs/vite#21081)) ([728c8ee](vitejs/vite@728c8ee))


## [v7.2.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-721-2025-11-06-small)

##### Bug Fixes

- **worker:** some worker asset was missing ([#21074](vitejs/vite#21074)) ([82d2d6c](vitejs/vite@82d2d6c))

##### Code Refactoring

- **build:** rename `indexOfMatchInSlice` to `findPreloadMarker` ([#21054](vitejs/vite#21054)) ([f83264f](vitejs/vite@f83264f))


## [v7.2.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#720-2025-11-05)

##### Bug Fixes

- **css:** fallback to sass when sass-embedded platform binary is missing ([#21002](vitejs/vite#21002)) ([b1fd616](vitejs/vite@b1fd616))
- **module-runner:** make `getBuiltins` response JSON serializable ([#21029](vitejs/vite#21029)) ([ad5b3bf](vitejs/vite@ad5b3bf))
- **types:** add undefined to optional properties for exactOptionalProperties type compatibility ([#21040](vitejs/vite#21040)) ([2833c55](vitejs/vite@2833c55))

##### Miscellaneous Chores

- **deps:** update rolldown-related dependencies ([#21047](vitejs/vite#21047)) ([e3a6a83](vitejs/vite@e3a6a83))


## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12)

Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details.


## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small)

##### Bug Fixes

- **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5))

##### Miscellaneous Chores

- **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2))

##### Code Refactoring

- use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af))

##### Build System

- remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce))
- remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Nov 9, 2025
| datasource | package | from   | to    |
| ---------- | ------- | ------ | ----- |
| npm        | vite    | 7.1.10 | 7.2.2 |


## [v7.2.2](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-722-2025-11-07-small)

##### Bug Fixes

- revert "refactor: use fs.cpSync ([#21019](vitejs/vite#21019))" ([#21081](vitejs/vite#21081)) ([728c8ee](vitejs/vite@728c8ee))


## [v7.2.1](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-721-2025-11-06-small)

##### Bug Fixes

- **worker:** some worker asset was missing ([#21074](vitejs/vite#21074)) ([82d2d6c](vitejs/vite@82d2d6c))

##### Code Refactoring

- **build:** rename `indexOfMatchInSlice` to `findPreloadMarker` ([#21054](vitejs/vite#21054)) ([f83264f](vitejs/vite@f83264f))


## [v7.2.0](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#720-2025-11-05)

##### Bug Fixes

- **css:** fallback to sass when sass-embedded platform binary is missing ([#21002](vitejs/vite#21002)) ([b1fd616](vitejs/vite@b1fd616))
- **module-runner:** make `getBuiltins` response JSON serializable ([#21029](vitejs/vite#21029)) ([ad5b3bf](vitejs/vite@ad5b3bf))
- **types:** add undefined to optional properties for exactOptionalProperties type compatibility ([#21040](vitejs/vite#21040)) ([2833c55](vitejs/vite@2833c55))

##### Miscellaneous Chores

- **deps:** update rolldown-related dependencies ([#21047](vitejs/vite#21047)) ([e3a6a83](vitejs/vite@e3a6a83))


## [v7.1.12](https://github.com/vitejs/vite/releases/tag/v7.1.12)

Please refer to [CHANGELOG.md](https://github.com/vitejs/vite/blob/v7.1.12/packages/vite/CHANGELOG.md) for details.


## [v7.1.11](https://github.com/vitejs/vite/blob/HEAD/packages/vite/CHANGELOG.md#small-7111-2025-10-20-small)

##### Bug Fixes

- **dev:** trim trailing slash before `server.fs.deny` check ([#20968](vitejs/vite#20968)) ([f479cc5](vitejs/vite@f479cc5))

##### Miscellaneous Chores

- **deps:** update all non-major dependencies ([#20966](vitejs/vite#20966)) ([6fb41a2](vitejs/vite@6fb41a2))

##### Code Refactoring

- use subpath imports for types module reference ([#20921](vitejs/vite#20921)) ([d0094af](vitejs/vite@d0094af))

##### Build System

- remove cjs reference in files field ([#20945](vitejs/vite#20945)) ([ef411ce](vitejs/vite@ef411ce))
- remove hash from built filenames ([#20946](vitejs/vite#20946)) ([a817307](vitejs/vite@a817307))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p1-chore Doesn't change code behavior (priority) trigger: preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants