This repository was archived by the owner on Jul 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,19 @@ export default {
94
94
const s = new MagicString ( source ) ;
95
95
deps . forEach ( ( dep ) => {
96
96
const { specifier : depSpecifier , importUrl, loc } = dep ;
97
- if ( ! isLikelyHttpURL ( depSpecifier ) && loc ) {
97
+ if ( ! loc ) {
98
+ return ;
99
+ }
100
+ if ( ! isLikelyHttpURL ( depSpecifier ) ) {
98
101
const sep = importUrl . includes ( "?" ) ? "&" : "?" ;
99
102
const version = depGraph . get ( depSpecifier ) ?. version ?? depGraph . globalVersion ;
100
103
const url = `"${ importUrl } ${ sep } ssr&v=${ version . toString ( 36 ) } "` ;
101
104
s . overwrite ( loc . start - 1 , loc . end - 1 , url ) ;
102
- } else if ( depSpecifier . startsWith ( alephPkgUri + "/" ) && depSpecifier . endsWith ( ".tsx" ) && loc ) {
105
+ } else if (
106
+ depSpecifier . startsWith ( alephPkgUri + "/" ) && (
107
+ depSpecifier . endsWith ( ".tsx" ) || alephPkgUri === "https://aleph"
108
+ )
109
+ ) {
103
110
const origin = Reflect . get ( globalThis , "__ALEPH_SERVER_ORIGIN" ) ;
104
111
const url = `"${ origin } ${ toLocalPath ( depSpecifier ) } ?ssr&v=${ depGraph . globalVersion . toString ( 36 ) } "` ;
105
112
s . overwrite ( loc . start - 1 , loc . end - 1 , url ) ;
You can’t perform that action at this time.
0 commit comments