From a7e2da8cdb306cfdf1660aa4b1fe24873a8dd873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0?= Date: Fri, 12 Jun 2026 20:27:16 +0900 Subject: [PATCH 1/2] feat: track dependencies when loading config with native (#22602) --- packages/vite/LICENSE.md | 29 +++++++++++++++++++++++++++++ packages/vite/package.json | 1 + packages/vite/src/node/config.ts | 20 +++++++++++++++----- pnpm-lock.yaml | 9 +++++++++ 4 files changed, 54 insertions(+), 5 deletions(-) diff --git a/packages/vite/LICENSE.md b/packages/vite/LICENSE.md index 6231fee859021c..ccf4c21380cdaf 100644 --- a/packages/vite/LICENSE.md +++ b/packages/vite/LICENSE.md @@ -990,6 +990,35 @@ Repository: https://github.com/follow-redirects/follow-redirects --------------------------------------- +## fresh-import +License: MIT +By: sapphi-red +Repository: https://github.com/sapphi-red/fresh-import + +> MIT License +> +> Copyright (c) 2026 sapphi-red +> +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in all +> copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +> SOFTWARE. + +--------------------------------------- + ## generic-names License: MIT By: Alexey Litvinov diff --git a/packages/vite/package.json b/packages/vite/package.json index f578429e78e407..af3c709f28e740 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -110,6 +110,7 @@ "escape-html": "^1.0.3", "estree-walker": "^3.0.3", "etag": "^1.8.1", + "fresh-import": "^0.2.1", "host-validation-middleware": "^0.1.4", "http-proxy-3": "^1.23.3", "launch-editor-middleware": "^2.14.1", diff --git a/packages/vite/src/node/config.ts b/packages/vite/src/node/config.ts index f4f287c6ac4eda..120fc0e28001b2 100644 --- a/packages/vite/src/node/config.ts +++ b/packages/vite/src/node/config.ts @@ -13,6 +13,7 @@ import { } from '@voidzero-dev/vite-task-client' import colors from 'picocolors' import picomatch from 'picomatch' +import { freshImport } from 'fresh-import' import { type NormalizedOutputOptions, type OutputChunk, @@ -2355,14 +2356,23 @@ export async function loadConfigFromFile( } } -async function nativeImportConfigFile(resolvedPath: string) { +async function nativeImportConfigFile( + resolvedPath: string, +): Promise<{ configExport: any; dependencies: string[] }> { + const freshImported = freshImport(pathToFileURL(resolvedPath).href) + if (freshImported) { + const { result, dependencies } = await freshImported + return { + configExport: (result as { [Symbol.toStringTag]: 'Module'; default: any }) + .default, + dependencies, + } + } + const module = await import( pathToFileURL(resolvedPath).href + '?t=' + Date.now() ) - return { - configExport: module.default, - dependencies: [], - } + return { configExport: module.default, dependencies: [] } } async function runnerImportConfigFile(resolvedPath: string) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 004a5c1fd71708..eef9b58b5a0ab0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -338,6 +338,9 @@ importers: etag: specifier: ^1.8.1 version: 1.8.1 + fresh-import: + specifier: ^0.2.1 + version: 0.2.1 host-validation-middleware: specifier: ^0.1.4 version: 0.1.4 @@ -5835,6 +5838,10 @@ packages: fraction.js@5.3.4: resolution: {integrity: sha512-1X1NTtiJphryn/uLQz3whtY6jK3fTqoE3ohKs0tT+Ujr1W59oopxmoEh7Lu5p6vBaPbgoM0bzveAW4Qi5RyWDQ==} + fresh-import@0.2.1: + resolution: {integrity: sha512-fwvkgwvZ60xFe0FQ5nynh9mgayR5HY0e0rzPs2cDiGhrOo7N8ARyMHP0Ew7bUFe7QAaZmouphLnCoJKAe6dTog==} + engines: {node: ^20.19.0 || >=22.12.0} + fresh@2.0.0: resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} engines: {node: '>= 0.8'} @@ -12101,6 +12108,8 @@ snapshots: fraction.js@5.3.4: {} + fresh-import@0.2.1: {} + fresh@2.0.0: {} fsevents@2.3.3: From 201293095cf0771e17770f0a7f0cbc360efd1bb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=A0?= Date: Fri, 12 Jun 2026 20:51:19 +0900 Subject: [PATCH 2/2] docs: update team page (#22663) --- docs/_data/team.js | 60 +++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/docs/_data/team.js b/docs/_data/team.js index 0db6c439f3e3d2..cd7f397a888592 100644 --- a/docs/_data/team.js +++ b/docs/_data/team.js @@ -13,6 +13,21 @@ export const core = [ ], sponsor: 'https://github.com/sponsors/yyx990803', }, + { + avatar: 'https://github.com/sapphi-red.png', + name: 'sapphi-red', + title: 'Web Developer', + org: 'VoidZero', + orgLink: 'https://voidzero.dev/', + desc: 'Vite core team member. Call me sapphi or midori ;)', + links: [ + { icon: 'github', link: 'https://github.com/sapphi-red' }, + { icon: 'bluesky', link: 'https://bsky.app/profile/sapphi.red' }, + { icon: 'twitter', link: 'https://twitter.com/sapphi_red' }, + { icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@sapphi_red' }, + ], + sponsor: 'https://github.com/sponsors/sapphi-red', + }, { avatar: 'https://www.github.com/patak-cat.png', name: 'Patak', @@ -28,9 +43,9 @@ export const core = [ avatar: 'https://www.github.com/antfu.png', name: 'Anthony Fu', title: 'A fanatical open sourceror', - org: 'NuxtLabs', - orgLink: 'https://nuxtlabs.com/', - desc: 'Core team member of Vite & Vue. Working at NuxtLabs.', + org: 'Vercel', + orgLink: 'https://vercel.com/', + desc: 'Core team member of Vite & Vue. Working on Nuxt.', links: [ { icon: 'github', link: 'https://github.com/antfu' }, { icon: 'bluesky', link: 'https://bsky.app/profile/antfu.me' }, @@ -51,19 +66,6 @@ export const core = [ ], sponsor: 'https://bjornlu.com/sponsor', }, - { - avatar: 'https://github.com/sapphi-red.png', - name: 'green', - title: 'Web Developer', - desc: 'Vite core team member. Call me sapphi or green or midori ;)', - links: [ - { icon: 'github', link: 'https://github.com/sapphi-red' }, - { icon: 'bluesky', link: 'https://bsky.app/profile/sapphi.red' }, - { icon: 'twitter', link: 'https://twitter.com/sapphi_red' }, - { icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@sapphi_red' }, - ], - sponsor: 'https://github.com/sponsors/sapphi-red', - }, { avatar: 'https://github.com/ArnaudBarre.png', name: 'Arnaud Barré', @@ -79,21 +81,12 @@ export const core = [ ], sponsor: 'https://github.com/sponsors/ArnaudBarre', }, - { - avatar: 'https://github.com/dominikg.png', - name: 'Dominik G.', - title: 'Resident CI Expert', - desc: 'Team Member of Vite and Svelte', - links: [ - { icon: 'github', link: 'https://github.com/dominikg' }, - { icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@dominikg' }, - ], - sponsor: 'https://github.com/sponsors/dominikg', - }, { avatar: 'https://github.com/sheremet-va.png', name: 'Vladimir', title: 'Core team member of Vitest & Vite', + org: 'VoidZero', + orgLink: 'https://voidzero.dev/', desc: 'An open source fullstack developer', links: [ { icon: 'github', link: 'https://github.com/sheremet-va' }, @@ -106,6 +99,8 @@ export const core = [ avatar: 'https://github.com/hi-ogawa.png', name: 'Hiroshi Ogawa', title: 'Team Member of Vitest & Vite', + org: 'VoidZero', + orgLink: 'https://voidzero.dev/', desc: 'Open source enthusiast', links: [ { icon: 'github', link: 'https://github.com/hi-ogawa' }, @@ -215,4 +210,15 @@ export const emeriti = [ ], sponsor: 'https://github.com/sponsors/haoqunjiang', }, + { + avatar: 'https://github.com/dominikg.png', + name: 'Dominik G.', + title: 'Resident CI Expert', + desc: 'Team Member of Vite and Svelte', + links: [ + { icon: 'github', link: 'https://github.com/dominikg' }, + { icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@dominikg' }, + ], + sponsor: 'https://github.com/sponsors/dominikg', + }, ]