File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,11 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
185185 // if the resolved id is not a valid browser import specifier,
186186 // prefix it to make it valid. We will strip this before feeding it
187187 // back into the transform pipeline
188- if ( ! url . startsWith ( '.' ) && ! url . startsWith ( '/' ) ) {
188+ if (
189+ ! url . startsWith ( '.' ) &&
190+ ! url . startsWith ( '/' ) &&
191+ ! isExternalUrl ( url )
192+ ) {
189193 url =
190194 VALID_ID_PREFIX + resolved . id . replace ( '\0' , NULL_BYTE_PLACEHOLDER )
191195 }
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ import { FSWatcher } from 'chokidar'
5757import {
5858 createDebugger ,
5959 generateCodeFrame ,
60+ isExternalUrl ,
6061 normalizePath ,
6162 numberToPos ,
6263 prettifyUrl ,
@@ -459,7 +460,7 @@ export async function createPluginContainer(
459460 }
460461
461462 if ( id ) {
462- partial . id = normalizePath ( id )
463+ partial . id = isExternalUrl ( id ) ? id : normalizePath ( id )
463464 return partial as PartialResolvedId
464465 } else {
465466 return null
You can’t perform that action at this time.
0 commit comments