File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1615,10 +1615,18 @@ function vitePluginUseClient(
16151615 '\0virtual:vite-rsc/client-in-server-package-proxy/' . length ,
16161616 ) ,
16171617 )
1618+ // Route absolute paths through `/@fs/` so import-analysis resolves
1619+ // them correctly even when the dependency optimizer doesn't rewrite
1620+ // the import to a `?v=<hash>` URL (e.g. when reached via a relative
1621+ // import from another package file).
1622+ const url = normalizeViteImportAnalysisUrl (
1623+ this . environment as DevEnvironment ,
1624+ id ,
1625+ )
16181626 // TODO: avoid `export default undefined`
16191627 return `
1620- export * from ${ JSON . stringify ( id ) } ;
1621- import * as __all__ from ${ JSON . stringify ( id ) } ;
1628+ export * from ${ JSON . stringify ( url ) } ;
1629+ import * as __all__ from ${ JSON . stringify ( url ) } ;
16221630 export default __all__.default;
16231631 `
16241632 }
You can’t perform that action at this time.
0 commit comments