File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/vite-plugin-svelte-inspector/src Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export function svelteInspector(options) {
34
34
enforce : 'pre' ,
35
35
36
36
applyToEnvironment ( env ) {
37
- return env . config . consumer === 'client' ;
37
+ return ! disabled && env . config . consumer === 'client' ;
38
38
} ,
39
39
40
40
configResolved ( config ) {
@@ -77,14 +77,14 @@ export function svelteInspector(options) {
77
77
filter : {
78
78
id : / ^ v i r t u a l : s v e l t e - i n s p e c t o r - /
79
79
} ,
80
- async handler ( importee , _ , options ) {
81
- if ( options ?. ssr || disabled ) {
80
+ async handler ( id ) {
81
+ if ( disabled ) {
82
82
return ;
83
83
}
84
- if ( importee . startsWith ( 'virtual:svelte-inspector-options' ) ) {
85
- return importee ;
86
- } else if ( importee . startsWith ( 'virtual:svelte-inspector-path:' ) ) {
87
- return importee . replace ( 'virtual:svelte-inspector-path:' , inspectorPath ) ;
84
+ if ( id === 'virtual:svelte-inspector-options' ) {
85
+ return id ;
86
+ } else if ( id . startsWith ( 'virtual:svelte-inspector-path:' ) ) {
87
+ return id . replace ( 'virtual:svelte-inspector-path:' , inspectorPath ) ;
88
88
}
89
89
}
90
90
} ,
You can’t perform that action at this time.
0 commit comments