File tree 3 files changed +8
-1
lines changed
vite-plugin-integrations-container
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' astro ' : patch
3
+ ---
4
+
5
+ Ensure injectRoute is properly handled in ` build ` as well as ` dev `
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ export async function createVite(
123
123
htmlVitePlugin ( ) ,
124
124
jsxVitePlugin ( { settings, logging } ) ,
125
125
astroPostprocessVitePlugin ( ) ,
126
- mode === 'dev' && astroIntegrationsContainerPlugin ( { settings, logging } ) ,
126
+ astroIntegrationsContainerPlugin ( { settings, logging } ) ,
127
127
astroScriptsPageSSRPlugin ( { settings } ) ,
128
128
astroHeadPlugin ( ) ,
129
129
astroScannerPlugin ( { settings, logging } ) ,
Original file line number Diff line number Diff line change @@ -17,9 +17,11 @@ export default function astroIntegrationsContainerPlugin({
17
17
return {
18
18
name : 'astro:integration-container' ,
19
19
configureServer ( server ) {
20
+ if ( server . config . isProduction ) return ;
20
21
runHookServerSetup ( { config : settings . config , server, logging } ) ;
21
22
} ,
22
23
async buildStart ( ) {
24
+ if ( settings . injectedRoutes . length === settings . resolvedInjectedRoutes . length ) return ;
23
25
// Ensure the injectedRoutes are all resolved to their final paths through Rollup
24
26
settings . resolvedInjectedRoutes = await Promise . all (
25
27
settings . injectedRoutes . map ( ( route ) => resolveEntryPoint . call ( this , route ) )
You can’t perform that action at this time.
0 commit comments