@@ -39,14 +39,12 @@ const SERVER_BUILD_FOLDER = '/$server_build/';
3939export default function createIntegration ( args ?: Options ) : AstroIntegration {
4040 let _config : AstroConfig ;
4141 let _buildConfig : BuildConfig ;
42- let needsBuildConfig = false ;
4342 const isModeDirectory = args ?. mode === 'directory' ;
4443
4544 return {
4645 name : '@astrojs/cloudflare' ,
4746 hooks : {
4847 'astro:config:setup' : ( { config, updateConfig } ) => {
49- needsBuildConfig = ! config . build . client ;
5048 updateConfig ( {
5149 build : {
5250 client : new URL ( `.${ config . base } ` , config . outDir ) ,
@@ -90,14 +88,6 @@ export default function createIntegration(args?: Options): AstroIntegration {
9088 vite . ssr . target = vite . ssr . target || 'webworker' ;
9189 }
9290 } ,
93- 'astro:build:start' : ( { buildConfig } ) => {
94- // Backwards compat
95- if ( needsBuildConfig ) {
96- buildConfig . client = new URL ( `.${ _config . base } ` , _config . outDir ) ;
97- buildConfig . server = new URL ( `.${ SERVER_BUILD_FOLDER } ` , _config . outDir ) ;
98- buildConfig . serverEntry = '_worker.js' ;
99- }
100- } ,
10191 'astro:build:done' : async ( ) => {
10292 const entryPath = fileURLToPath ( new URL ( _buildConfig . serverEntry , _buildConfig . server ) ) ,
10393 entryUrl = new URL ( _buildConfig . serverEntry , _config . outDir ) ,
0 commit comments