Skip to content

Commit b43950e

Browse files
authored
Remove deprecated APIs (#5707)
* Remove deprecated Astro globals * Remove deprecated hook param * Fix test * Add changeset * Add TODO
1 parent 49f8270 commit b43950e

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

  • packages/integrations/cloudflare/src

packages/integrations/cloudflare/src/index.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,12 @@ const SERVER_BUILD_FOLDER = '/$server_build/';
3939
export 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

Comments
 (0)