From 07b9ca802eb4bbfc14c4e421f8a047fef3a7b439 Mon Sep 17 00:00:00 2001 From: Wes Souza Date: Mon, 2 Dec 2024 09:48:01 -0500 Subject: [PATCH] fix(actions): explicitly import index.ts to fix types when moduleResolution is NodeNext (#12578) --- .changeset/empty-jobs-impress.md | 5 +++++ packages/astro/src/actions/integration.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/empty-jobs-impress.md diff --git a/.changeset/empty-jobs-impress.md b/.changeset/empty-jobs-impress.md new file mode 100644 index 0000000000..09a57fe391 --- /dev/null +++ b/.changeset/empty-jobs-impress.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Explicitly import index.ts to fix types when moduleResolution is NodeNext diff --git a/packages/astro/src/actions/integration.ts b/packages/astro/src/actions/integration.ts index 13d76e8b60..535d15ae5c 100644 --- a/packages/astro/src/actions/integration.ts +++ b/packages/astro/src/actions/integration.ts @@ -38,7 +38,7 @@ export default function astroIntegrationActionsRouteHandler({ } const stringifiedActionsImport = JSON.stringify( - viteID(new URL('./actions', params.config.srcDir)), + viteID(new URL('./actions/index.ts', params.config.srcDir)), ); settings.injectedTypes.push({ filename: ACTIONS_TYPES_FILE,