File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ export type RscPluginOptions = {
119119  keepUseCientProxy ?: boolean 
120120
121121  /** 
122-    * Build -time validation for  client-only and server-only imports 
122+    * Enable build -time validation of ' client-only'  and ' server-only'  imports 
123123   * @default  true 
124124   */ 
125125  validateImports ?: boolean 
@@ -418,10 +418,6 @@ export default function vitePluginRsc(
418418        } 
419419      } , 
420420    } , 
421-     // conditionally add import validation plugin 
422-     ...( rscPluginOptions . validateImports  !==  false 
423-       ? [ validateImportPlugin ( ) ] 
424-       : [ ] ) , 
425421    { 
426422      name : 'rsc:patch-browser-raw-import' , 
427423      transform : { 
@@ -817,6 +813,9 @@ globalThis.AsyncLocalStorage = __viteRscAyncHooks.AsyncLocalStorage;
817813    ...vitePluginDefineEncryptionKey ( rscPluginOptions ) , 
818814    ...vitePluginFindSourceMapURL ( ) , 
819815    ...vitePluginRscCss ( {  rscCssTransform : rscPluginOptions . rscCssTransform  } ) , 
816+     ...( rscPluginOptions . validateImports  !==  false 
817+       ? [ validateImportPlugin ( ) ] 
818+       : [ ] ) , 
820819    scanBuildStripPlugin ( ) , 
821820  ] 
822821} 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments