File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,9 @@ import {
38
38
moduleListContains ,
39
39
normalizePath ,
40
40
prettifyUrl ,
41
- removeImportQuery ,
42
41
stripBomTag ,
43
42
timeFrom ,
44
- transformStableResult ,
45
- unwrapId
43
+ transformStableResult
46
44
} from '../utils'
47
45
import type { ResolvedConfig } from '../config'
48
46
import type { Plugin } from '../plugin'
@@ -706,10 +704,6 @@ export function importAnalysisPlugin(config: ResolvedConfig): Plugin {
706
704
// by the deps optimizer
707
705
if ( config . server . preTransformRequests && staticImportedUrls . size ) {
708
706
staticImportedUrls . forEach ( ( { url, id } ) => {
709
- url = unwrapId ( removeImportQuery ( url ) ) . replace (
710
- NULL_BYTE_PLACEHOLDER ,
711
- '\0'
712
- )
713
707
transformRequest ( url , server , { ssr } ) . catch ( ( e ) => {
714
708
if ( e ?. code === ERR_OUTDATED_OPTIMIZED_DEP ) {
715
709
// This are expected errors
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export async function ssrLoadModule(
38
38
urlStack : string [ ] = [ ] ,
39
39
fixStacktrace ?: boolean
40
40
) : Promise < SSRModule > {
41
- url = unwrapId ( url ) . replace ( NULL_BYTE_PLACEHOLDER , '\0' )
41
+ url = unwrapId ( url )
42
42
43
43
// when we instantiate multiple dependency modules in parallel, they may
44
44
// point to shared modules. We need to avoid duplicate instantiation attempts
@@ -137,7 +137,7 @@ async function instantiateModule(
137
137
if ( dep [ 0 ] !== '.' && dep [ 0 ] !== '/' ) {
138
138
return nodeImport ( dep , mod . file ! , resolveOptions )
139
139
}
140
- dep = unwrapId ( dep )
140
+ dep = unwrapId ( dep ) . replace ( NULL_BYTE_PLACEHOLDER , '\0' )
141
141
if ( ! isCircular ( dep ) && ! pendingImports . get ( dep ) ?. some ( isCircular ) ) {
142
142
pendingDeps . push ( dep )
143
143
if ( pendingDeps . length === 1 ) {
You can’t perform that action at this time.
0 commit comments