mirror of
https://github.com/withastro/astro.git
synced 2025-03-10 23:01:26 -05:00
Remove deprecated APIs (#5707)
* Remove deprecated Astro globals * Remove deprecated hook param * Fix test * Add changeset * Add TODO
This commit is contained in:
parent
c232b9343e
commit
af52c1d524
2 changed files with 0 additions and 18 deletions
|
@ -30,13 +30,11 @@ export default function vercelEdge({ includeFiles = [] }: VercelEdgeConfig = {})
|
|||
let buildTempFolder: URL;
|
||||
let functionFolder: URL;
|
||||
let serverEntry: string;
|
||||
let needsBuildConfig = false;
|
||||
|
||||
return {
|
||||
name: PACKAGE_NAME,
|
||||
hooks: {
|
||||
'astro:config:setup': ({ config, updateConfig }) => {
|
||||
needsBuildConfig = !config.build.client;
|
||||
const outDir = getVercelOutput(config.root);
|
||||
updateConfig({
|
||||
outDir,
|
||||
|
@ -61,13 +59,6 @@ export default function vercelEdge({ includeFiles = [] }: VercelEdgeConfig = {})
|
|||
`);
|
||||
}
|
||||
},
|
||||
'astro:build:start': ({ buildConfig }) => {
|
||||
if (needsBuildConfig) {
|
||||
buildConfig.client = new URL('./static/', _config.outDir);
|
||||
buildTempFolder = buildConfig.server = new URL('./dist/', _config.root);
|
||||
serverEntry = buildConfig.serverEntry = 'entry.mjs';
|
||||
}
|
||||
},
|
||||
'astro:build:setup': ({ vite, target }) => {
|
||||
if (target === 'server') {
|
||||
vite.resolve ||= {};
|
||||
|
|
|
@ -29,13 +29,11 @@ export default function vercelServerless({
|
|||
let buildTempFolder: URL;
|
||||
let functionFolder: URL;
|
||||
let serverEntry: string;
|
||||
let needsBuildConfig = false;
|
||||
|
||||
return {
|
||||
name: PACKAGE_NAME,
|
||||
hooks: {
|
||||
'astro:config:setup': ({ config, updateConfig }) => {
|
||||
needsBuildConfig = !config.build.client;
|
||||
const outDir = getVercelOutput(config.root);
|
||||
updateConfig({
|
||||
outDir,
|
||||
|
@ -60,13 +58,6 @@ export default function vercelServerless({
|
|||
`);
|
||||
}
|
||||
},
|
||||
'astro:build:start': ({ buildConfig }) => {
|
||||
if (needsBuildConfig) {
|
||||
buildConfig.client = new URL('./static/', _config.outDir);
|
||||
buildTempFolder = buildConfig.server = new URL('./dist/', _config.root);
|
||||
serverEntry = buildConfig.serverEntry = 'entry.js';
|
||||
}
|
||||
},
|
||||
'astro:build:done': async ({ routes }) => {
|
||||
// Merge any includes from `vite.assetsInclude
|
||||
const inc = includeFiles?.map((file) => new URL(file, _config.root)) || [];
|
||||
|
|
Loading…
Add table
Reference in a new issue