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,