Skip to content

Commit

Permalink
fix: pick up config from endpoints (#8933)
Browse files Browse the repository at this point in the history
Fixes #8908
  • Loading branch information
dummdidumm committed Feb 8, 2023
1 parent a402d50 commit 1960296
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-boxes-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix: pick up config from endpoints
2 changes: 2 additions & 0 deletions packages/kit/src/core/postbuild/analyse.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ async function analyse({ manifest_path, env }) {
if (mod.PUT) methods.add('PUT');
if (mod.PATCH) methods.add('PATCH');
if (mod.DELETE) methods.add('DELETE');

config = mod.config;
}

if (route.page) {
Expand Down
1 change: 1 addition & 0 deletions packages/kit/types/internal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ export interface PageNodeIndexes {
export type SSREndpoint = Partial<Record<HttpMethod, RequestHandler>> & {
prerender?: PrerenderOption;
trailingSlash?: TrailingSlash;
config?: any;
};

export interface SSRRoute {
Expand Down

0 comments on commit 1960296

Please sign in to comment.