File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1007,10 +1007,9 @@ import.meta.hot.on("rsc:update", () => {
10071007 ...vitePluginRscMinimal ( rscPluginOptions , manager ) ,
10081008 ...vitePluginFindSourceMapURL ( ) ,
10091009 ...vitePluginRscCss ( rscPluginOptions , manager ) ,
1010- // TODO: delay validateImports option check after config
1011- ...( rscPluginOptions . validateImports !== false
1012- ? [ validateImportPlugin ( ) ]
1013- : [ ] ) ,
1010+ validateImportPlugin ( {
1011+ apply : ( ) => rscPluginOptions . validateImports !== false ,
1012+ } ) ,
10141013 scanBuildStripPlugin ( { manager } ) ,
10151014 ...cjsModuleRunnerPlugin ( ) ,
10161015 ...globalAsyncLocalStoragePlugin ( ) ,
Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ import type { Plugin } from 'vite'
33// https://github.com/vercel/next.js/blob/90f564d376153fe0b5808eab7b83665ee5e08aaf/packages/next/src/build/webpack-config.ts#L1249-L1280
44// https://github.com/pcattori/vite-env-only/blob/68a0cc8546b9a37c181c0b0a025eb9b62dbedd09/src/deny-imports.ts
55// https://github.com/sveltejs/kit/blob/84298477a014ec471839adf7a4448d91bc7949e4/packages/kit/src/exports/vite/index.js#L513
6- export function validateImportPlugin ( ) : Plugin {
6+ export function validateImportPlugin ( opts : Pick < Plugin , 'apply' > ) : Plugin {
77 return {
88 name : 'rsc:validate-imports' ,
9+ ...opts ,
910 resolveId : {
1011 order : 'pre' ,
1112 async handler ( source , importer , options ) {
You can’t perform that action at this time.
0 commit comments