File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,9 @@ class RscPluginManager {
173173 let code = 'export default {\n'
174174 for ( const [ resolvedId , meta ] of Object . entries ( imports ) ) {
175175 if ( ! meta . fileName ) {
176- console . warn (
176+ throw new Error (
177177 `[vite-rsc] missing output for environment import: ${ resolvedId } ` ,
178178 )
179- continue
180179 }
181180 const targetOutDir =
182181 this . config . environments [ meta . targetEnv ] ! . build . outDir
Original file line number Diff line number Diff line change @@ -132,10 +132,11 @@ export function vitePluginImportEnvironment(
132132 resolvedId = resolved . id
133133 }
134134
135+ // TODO: environmentImportMetaMap structure seems still awkward
135136 // Track discovered entry, keyed by [sourceEnv][resolvedId]
136137 const sourceEnv = this . environment . name
137138 manager . environmentImportMetaMap [ sourceEnv ] ??= { }
138- manager . environmentImportMetaMap [ sourceEnv ] ! [ resolvedId ] = {
139+ manager . environmentImportMetaMap [ sourceEnv ] ! [ resolvedId ] ?? = {
139140 resolvedId,
140141 targetEnv : environmentName ,
141142 sourceEnv,
You can’t perform that action at this time.
0 commit comments