Skip to content

Commit

Permalink
fix: isr import
Browse files Browse the repository at this point in the history
  • Loading branch information
rossrobino committed Feb 13, 2025
1 parent 61f31bf commit 67a9726
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/rude-pandas-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@domcojs/vercel": patch
---

fix: isr import
2 changes: 1 addition & 1 deletion packages/create-domco/src/template-files/func.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const getTemplateFiles: GetTemplateFile = ({ lang }) => {
contents: `${isTs ? `import type { Handler } from "domco";` : `/** @import { Handler } from "domco" */`}
import { html } from "client:page";
${isTs ? "" : "\n/** @type {Handler} */"}
export const handler${isTs ? ": Handler" : ""} = (req) => {
export const handler${isTs ? ": Handler" : ""} = async (req) => {
const { pathname } = new URL(req.url);
if (pathname === "/") {
Expand Down
2 changes: 1 addition & 1 deletion packages/vercel/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const isrEntry: AdapterEntry = ({ funcId }) => {
code: `
import { handler } from "${funcId}";
import { nodeListener } from "domco/listener";
import { getUrl } from "domco/adapter/vercel";
import { getUrl } from "@domcojs/vercel";
const isrHandler = async (req) => handler(new Request(getUrl(req)));
Expand Down

0 comments on commit 67a9726

Please sign in to comment.