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) {
3434 enforce : 'pre' ,
3535
3636 applyToEnvironment ( env ) {
37- return env . config . consumer === 'client' ;
37+ return ! disabled && env . config . consumer === 'client' ;
3838 } ,
3939
4040 configResolved ( config ) {
@@ -77,14 +77,14 @@ export function svelteInspector(options) {
7777 filter : {
7878 id : / ^ v i r t u a l : s v e l t e - i n s p e c t o r - /
7979 } ,
80- async handler ( importee , _ , options ) {
81- if ( options ?. ssr || disabled ) {
80+ async handler ( id ) {
81+ if ( disabled ) {
8282 return ;
8383 }
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 ) ;
8888 }
8989 }
9090 } ,
You can’t perform that action at this time.
0 commit comments