summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmark/packages/timer/tsconfig.json5
-rw-r--r--packages/astro-prism/tsconfig.json3
-rw-r--r--packages/astro-rss/src/util.ts2
-rw-r--r--packages/astro-rss/tsconfig.json6
-rw-r--r--packages/astro/client.d.ts8
-rw-r--r--packages/astro/src/@types/astro.ts28
-rw-r--r--packages/astro/src/assets/build/generate.ts2
-rw-r--r--packages/astro/src/assets/services/vendor/squoosh/codecs.ts6
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/bmp.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/cur.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/dds.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/gif.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/icns.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/ico.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/j2c.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/jp2.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/jpg.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/ktx.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/png.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/pnm.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/psd.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/svg.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/tiff.ts2
-rw-r--r--packages/astro/src/assets/vendor/image-size/types/webp.ts2
-rw-r--r--packages/astro/src/assets/vite-plugin-assets.ts2
-rw-r--r--packages/astro/src/cli/add/babel.ts6
-rw-r--r--packages/astro/src/config/index.ts2
-rw-r--r--packages/astro/src/config/vite-plugin-content-listen.ts2
-rw-r--r--packages/astro/src/content/types-generator.ts2
-rw-r--r--packages/astro/src/content/vite-plugin-content-assets.ts2
-rw-r--r--packages/astro/src/core/app/common.ts2
-rw-r--r--packages/astro/src/core/app/index.ts6
-rw-r--r--packages/astro/src/core/app/node.ts4
-rw-r--r--packages/astro/src/core/app/ssrPipeline.ts2
-rw-r--r--packages/astro/src/core/app/types.ts4
-rw-r--r--packages/astro/src/core/build/buildPipeline.ts8
-rw-r--r--packages/astro/src/core/build/common.ts2
-rw-r--r--packages/astro/src/core/build/css-asset-name.ts2
-rw-r--r--packages/astro/src/core/build/generate.ts4
-rw-r--r--packages/astro/src/core/build/index.ts2
-rw-r--r--packages/astro/src/core/build/internal.ts6
-rw-r--r--packages/astro/src/core/build/page-data.ts6
-rw-r--r--packages/astro/src/core/build/plugin.ts4
-rw-r--r--packages/astro/src/core/build/plugins/index.ts2
-rw-r--r--packages/astro/src/core/build/plugins/plugin-analyzer.ts2
-rw-r--r--packages/astro/src/core/build/plugins/plugin-css.ts6
-rw-r--r--packages/astro/src/core/build/plugins/plugin-hoisted-scripts.ts6
-rw-r--r--packages/astro/src/core/build/plugins/plugin-internals.ts2
-rw-r--r--packages/astro/src/core/build/plugins/plugin-manifest.ts10
-rw-r--r--packages/astro/src/core/build/plugins/plugin-middleware.ts6
-rw-r--r--packages/astro/src/core/build/plugins/plugin-pages.ts6
-rw-r--r--packages/astro/src/core/build/plugins/plugin-prerender.ts2
-rw-r--r--packages/astro/src/core/build/plugins/plugin-renderers.ts4
-rw-r--r--packages/astro/src/core/build/plugins/plugin-ssr.ts10
-rw-r--r--packages/astro/src/core/build/static-build.ts4
-rw-r--r--packages/astro/src/core/build/types.ts9
-rw-r--r--packages/astro/src/core/compile/cache.ts2
-rw-r--r--packages/astro/src/core/compile/compile.ts2
-rw-r--r--packages/astro/src/core/compile/index.ts4
-rw-r--r--packages/astro/src/core/config/config.ts2
-rw-r--r--packages/astro/src/core/config/index.ts2
-rw-r--r--packages/astro/src/core/config/schema.ts2
-rw-r--r--packages/astro/src/core/config/settings.ts2
-rw-r--r--packages/astro/src/core/cookies/response.ts2
-rw-r--r--packages/astro/src/core/create-vite.ts6
-rw-r--r--packages/astro/src/core/dev/container.ts2
-rw-r--r--packages/astro/src/core/dev/dev.ts2
-rw-r--r--packages/astro/src/core/dev/restart.ts4
-rw-r--r--packages/astro/src/core/endpoint/dev/index.ts2
-rw-r--r--packages/astro/src/core/endpoint/index.ts4
-rw-r--r--packages/astro/src/core/errors/index.ts2
-rw-r--r--packages/astro/src/core/errors/overlay.ts2
-rw-r--r--packages/astro/src/core/middleware/callMiddleware.ts4
-rw-r--r--packages/astro/src/core/middleware/index.ts2
-rw-r--r--packages/astro/src/core/middleware/loadMiddleware.ts4
-rw-r--r--packages/astro/src/core/middleware/sequence.ts2
-rw-r--r--packages/astro/src/core/module-loader/loader.ts2
-rw-r--r--packages/astro/src/core/module-loader/vite.ts2
-rw-r--r--packages/astro/src/core/pipeline.ts2
-rw-r--r--packages/astro/src/core/preview/index.ts2
-rw-r--r--packages/astro/src/core/preview/static-preview-server.ts4
-rw-r--r--packages/astro/src/core/redirects/component.ts4
-rw-r--r--packages/astro/src/core/redirects/helpers.ts7
-rw-r--r--packages/astro/src/core/render/context.ts4
-rw-r--r--packages/astro/src/core/render/core.ts2
-rw-r--r--packages/astro/src/core/render/environment.ts2
-rw-r--r--packages/astro/src/core/render/index.ts4
-rw-r--r--packages/astro/src/core/render/paginate.ts2
-rw-r--r--packages/astro/src/core/render/params-and-props.ts2
-rw-r--r--packages/astro/src/core/render/renderer.ts2
-rw-r--r--packages/astro/src/core/render/result.ts2
-rw-r--r--packages/astro/src/core/render/route-cache.ts2
-rw-r--r--packages/astro/src/core/render/ssr-element.ts4
-rw-r--r--packages/astro/src/core/request.ts2
-rw-r--r--packages/astro/src/core/routing/manifest/create.ts4
-rw-r--r--packages/astro/src/core/routing/manifest/generator.ts2
-rw-r--r--packages/astro/src/core/routing/manifest/serialization.ts2
-rw-r--r--packages/astro/src/core/routing/match.ts2
-rw-r--r--packages/astro/src/core/routing/params.ts2
-rw-r--r--packages/astro/src/core/routing/validation.ts4
-rw-r--r--packages/astro/src/core/sync/index.ts2
-rw-r--r--packages/astro/src/core/util.ts4
-rw-r--r--packages/astro/src/events/session.ts2
-rw-r--r--packages/astro/src/integrations/astroFeaturesValidation.ts2
-rw-r--r--packages/astro/src/integrations/index.ts4
-rw-r--r--packages/astro/src/jsx/babel.ts2
-rw-r--r--packages/astro/src/prerender/metadata.ts2
-rw-r--r--packages/astro/src/prerender/routing.ts4
-rw-r--r--packages/astro/src/prerender/utils.ts2
-rw-r--r--packages/astro/src/runtime/client/idle.ts2
-rw-r--r--packages/astro/src/runtime/client/load.ts2
-rw-r--r--packages/astro/src/runtime/client/media.ts2
-rw-r--r--packages/astro/src/runtime/client/only.ts2
-rw-r--r--packages/astro/src/runtime/client/visible.ts2
-rw-r--r--packages/astro/src/runtime/server/astro-component.ts2
-rw-r--r--packages/astro/src/runtime/server/astro-global.ts2
-rw-r--r--packages/astro/src/runtime/server/endpoint.ts2
-rw-r--r--packages/astro/src/runtime/server/hydration.ts2
-rw-r--r--packages/astro/src/runtime/server/render/astro/factory.ts6
-rw-r--r--packages/astro/src/runtime/server/render/astro/head-and-content.ts2
-rw-r--r--packages/astro/src/runtime/server/render/astro/index.ts4
-rw-r--r--packages/astro/src/runtime/server/render/astro/instance.ts2
-rw-r--r--packages/astro/src/runtime/server/render/astro/render.ts2
-rw-r--r--packages/astro/src/runtime/server/render/common.ts2
-rw-r--r--packages/astro/src/runtime/server/render/component.ts2
-rw-r--r--packages/astro/src/runtime/server/render/dom.ts2
-rw-r--r--packages/astro/src/runtime/server/render/head.ts2
-rw-r--r--packages/astro/src/runtime/server/render/index.ts4
-rw-r--r--packages/astro/src/runtime/server/render/page.ts4
-rw-r--r--packages/astro/src/runtime/server/render/tags.ts4
-rw-r--r--packages/astro/src/runtime/server/render/util.ts2
-rw-r--r--packages/astro/src/runtime/server/scripts.ts2
-rw-r--r--packages/astro/src/runtime/server/serialize.ts4
-rw-r--r--packages/astro/src/runtime/server/transition.ts6
-rw-r--r--packages/astro/src/transitions/index.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro-server/base.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro-server/controller.ts4
-rw-r--r--packages/astro/src/vite-plugin-astro-server/css.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro-server/devPipeline.ts8
-rw-r--r--packages/astro/src/vite-plugin-astro-server/index.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro-server/metadata.ts4
-rw-r--r--packages/astro/src/vite-plugin-astro-server/plugin.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro-server/request.ts6
-rw-r--r--packages/astro/src/vite-plugin-astro-server/resolve.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro-server/response.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro-server/route.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro-server/scripts.ts6
-rw-r--r--packages/astro/src/vite-plugin-astro-server/vite.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro/compile.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro/hmr.ts2
-rw-r--r--packages/astro/src/vite-plugin-astro/index.ts4
-rw-r--r--packages/astro/src/vite-plugin-astro/metadata.ts4
-rw-r--r--packages/astro/src/vite-plugin-astro/types.ts2
-rw-r--r--packages/astro/src/vite-plugin-config-alias/index.ts2
-rw-r--r--packages/astro/src/vite-plugin-env/index.ts2
-rw-r--r--packages/astro/src/vite-plugin-head/index.ts4
-rw-r--r--packages/astro/src/vite-plugin-markdown/index.ts2
-rw-r--r--packages/astro/src/vite-plugin-mdx/index.ts4
-rw-r--r--packages/astro/src/vite-plugin-utils/index.ts2
-rw-r--r--packages/astro/tsconfig.json2
-rw-r--r--packages/astro/types.d.ts2
-rw-r--r--packages/create-astro/package.json2
-rw-r--r--packages/create-astro/src/actions/dependencies.ts2
-rw-r--r--packages/create-astro/src/actions/git.ts2
-rw-r--r--packages/create-astro/src/actions/intro.ts2
-rw-r--r--packages/create-astro/src/actions/next-steps.ts2
-rw-r--r--packages/create-astro/src/actions/project-name.ts2
-rw-r--r--packages/create-astro/src/actions/template.ts2
-rw-r--r--packages/create-astro/src/actions/typescript.ts2
-rw-r--r--packages/create-astro/src/actions/verify.ts2
-rw-r--r--packages/create-astro/tsconfig.json10
-rw-r--r--packages/integrations/alpinejs/tsconfig.json5
-rw-r--r--packages/integrations/cloudflare/package.json11
-rw-r--r--packages/integrations/cloudflare/src/index.ts4
-rw-r--r--packages/integrations/cloudflare/tsconfig.json5
-rw-r--r--packages/integrations/deno/tsconfig.json4
-rw-r--r--packages/integrations/lit/tsconfig.json5
-rw-r--r--packages/integrations/markdoc/src/html/index.ts4
-rw-r--r--packages/integrations/markdoc/src/html/transform/html-token-transform.ts1
-rw-r--r--packages/integrations/markdoc/tsconfig.json5
-rw-r--r--packages/integrations/mdx/tsconfig.json5
-rw-r--r--packages/integrations/netlify/tsconfig.json6
-rw-r--r--packages/integrations/node/src/index.ts2
-rw-r--r--packages/integrations/node/src/nodeMiddleware.ts6
-rw-r--r--packages/integrations/node/src/preview.ts2
-rw-r--r--packages/integrations/node/src/server.ts2
-rw-r--r--packages/integrations/node/src/standalone.ts2
-rw-r--r--packages/integrations/node/tsconfig.json5
-rw-r--r--packages/integrations/partytown/tsconfig.json5
-rw-r--r--packages/integrations/preact/src/client.ts2
-rw-r--r--packages/integrations/preact/src/context.ts2
-rw-r--r--packages/integrations/preact/src/index.ts2
-rw-r--r--packages/integrations/preact/src/server.ts4
-rw-r--r--packages/integrations/preact/src/signals.ts4
-rw-r--r--packages/integrations/preact/tsconfig.json5
-rw-r--r--packages/integrations/prefetch/tsconfig.json5
-rw-r--r--packages/integrations/react/src/index.ts2
-rw-r--r--packages/integrations/react/tsconfig.json5
-rw-r--r--packages/integrations/sitemap/tsconfig.json5
-rw-r--r--packages/integrations/solid/src/context.ts2
-rw-r--r--packages/integrations/solid/src/server.ts2
-rw-r--r--packages/integrations/solid/tsconfig.json5
-rw-r--r--packages/integrations/svelte/tsconfig.json4
-rw-r--r--packages/integrations/tailwind/src/index.ts1
-rw-r--r--packages/integrations/tailwind/tsconfig.json5
-rw-r--r--packages/integrations/vercel/src/image/build-service.ts2
-rw-r--r--packages/integrations/vercel/src/image/dev-service.ts2
-rw-r--r--packages/integrations/vercel/src/serverless/entrypoint.ts4
-rw-r--r--packages/integrations/vercel/tsconfig.json5
-rw-r--r--packages/integrations/vue/tsconfig.json4
-rw-r--r--packages/internal-helpers/tsconfig.json3
-rw-r--r--packages/markdown/remark/src/index.ts2
-rw-r--r--packages/markdown/remark/src/remark-collect-images.ts2
-rw-r--r--packages/markdown/remark/tsconfig.json3
-rw-r--r--packages/telemetry/package.json4
-rw-r--r--packages/telemetry/tsconfig.json6
-rw-r--r--packages/underscore-redirects/src/print.ts2
-rw-r--r--packages/underscore-redirects/tsconfig.json3
-rw-r--r--pnpm-lock.yaml18
-rw-r--r--tsconfig.base.json6
220 files changed, 346 insertions, 404 deletions
diff --git a/benchmark/packages/timer/tsconfig.json b/benchmark/packages/timer/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/benchmark/packages/timer/tsconfig.json
+++ b/benchmark/packages/timer/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/astro-prism/tsconfig.json b/packages/astro-prism/tsconfig.json
index fd652e629..18443cddf 100644
--- a/packages/astro-prism/tsconfig.json
+++ b/packages/astro-prism/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "target": "ES2022",
- "module": "ES2022",
"outDir": "./dist"
}
}
diff --git a/packages/astro-rss/src/util.ts b/packages/astro-rss/src/util.ts
index e40301a4c..bc1589780 100644
--- a/packages/astro-rss/src/util.ts
+++ b/packages/astro-rss/src/util.ts
@@ -1,5 +1,5 @@
import type { z } from 'astro/zod';
-import type { RSSOptions } from './index';
+import type { RSSOptions } from './index.js';
/** Normalize URL to its canonical form */
export function createCanonicalURL(
diff --git a/packages/astro-rss/tsconfig.json b/packages/astro-rss/tsconfig.json
index d8efd2fec..18443cddf 100644
--- a/packages/astro-rss/tsconfig.json
+++ b/packages/astro-rss/tsconfig.json
@@ -2,10 +2,6 @@
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022",
- "strictNullChecks": true
+ "outDir": "./dist"
}
}
diff --git a/packages/astro/client.d.ts b/packages/astro/client.d.ts
index 90f06c72d..183527d74 100644
--- a/packages/astro/client.d.ts
+++ b/packages/astro/client.d.ts
@@ -52,7 +52,7 @@ declare module 'astro:assets' {
| import('./dist/assets/types.js').ImageTransform
| import('./dist/assets/types.js').UnresolvedImageTransform
) => Promise<import('./dist/assets/types.js').GetImageResult>;
- imageConfig: import('./dist/@types/astro').AstroConfig['image'];
+ imageConfig: import('./dist/@types/astro.js').AstroConfig['image'];
getConfiguredImageService: typeof import('./dist/assets/index.js').getConfiguredImageService;
Image: typeof import('./components/Image.astro').default;
};
@@ -126,7 +126,7 @@ declare module 'astro:components' {
export * from 'astro/components';
}
-type MD = import('./dist/@types/astro').MarkdownInstance<Record<string, any>>;
+type MD = import('./dist/@types/astro.js').MarkdownInstance<Record<string, any>>;
interface ExportedMarkdownModuleEntities {
frontmatter: MD['frontmatter'];
file: MD['file'];
@@ -231,7 +231,7 @@ declare module '*.mdown' {
}
declare module '*.mdx' {
- type MDX = import('./dist/@types/astro').MDXInstance<Record<string, any>>;
+ type MDX = import('./dist/@types/astro.js').MDXInstance<Record<string, any>>;
export const frontmatter: MDX['frontmatter'];
export const file: MDX['file'];
@@ -244,7 +244,7 @@ declare module '*.mdx' {
}
declare module 'astro:ssr-manifest' {
- export const manifest: import('./dist/@types/astro').SSRManifest;
+ export const manifest: import('./dist/@types/astro.js').SSRManifest;
}
// Everything below are Vite's types (apart from image types, which are in `client.d.ts`)
diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts
index 4210dd36d..67eed4a9f 100644
--- a/packages/astro/src/@types/astro.ts
+++ b/packages/astro/src/@types/astro.ts
@@ -13,16 +13,16 @@ import type { AddressInfo } from 'node:net';
import type * as rollup from 'rollup';
import type { TsConfigJson } from 'tsconfig-resolver';
import type * as vite from 'vite';
-import type { RemotePattern } from '../assets/utils/remotePattern';
-import type { SerializedSSRManifest } from '../core/app/types';
-import type { PageBuildData } from '../core/build/types';
-import type { AstroConfigType } from '../core/config';
-import type { AstroTimer } from '../core/config/timer';
-import type { AstroCookies } from '../core/cookies';
+import type { RemotePattern } from '../assets/utils/remotePattern.js';
+import type { SerializedSSRManifest } from '../core/app/types.js';
+import type { PageBuildData } from '../core/build/types.js';
+import type { AstroConfigType } from '../core/config/index.js';
+import type { AstroTimer } from '../core/config/timer.js';
+import type { AstroCookies } from '../core/cookies/index.js';
import type { ResponseWithEncoding } from '../core/endpoint/index.js';
-import type { AstroIntegrationLogger, Logger, LoggerLevel } from '../core/logger/core';
-import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server';
-import type { OmitIndexSignature, Simplify } from '../type-utils';
+import type { AstroIntegrationLogger, Logger, LoggerLevel } from '../core/logger/core.js';
+import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server/index.js';
+import type { OmitIndexSignature, Simplify } from '../type-utils.js';
import type { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../core/constants.js';
export { type AstroIntegrationLogger };
@@ -39,7 +39,7 @@ export type {
ExternalImageService,
ImageService,
LocalImageService,
-} from '../assets/services/service';
+} from '../assets/services/service.js';
export type {
GetImageResult,
ImageInputFormat,
@@ -48,10 +48,10 @@ export type {
ImageQuality,
ImageQualityPreset,
ImageTransform,
-} from '../assets/types';
-export type { RemotePattern } from '../assets/utils/remotePattern';
-export type { SSRManifest } from '../core/app/types';
-export type { AstroCookies } from '../core/cookies';
+} from '../assets/types.js';
+export type { RemotePattern } from '../assets/utils/remotePattern.js';
+export type { SSRManifest } from '../core/app/types.js';
+export type { AstroCookies } from '../core/cookies/index.js';
export interface AstroBuiltinProps {
'client:load'?: boolean;
diff --git a/packages/astro/src/assets/build/generate.ts b/packages/astro/src/assets/build/generate.ts
index 71903e994..dfc0d9a0d 100644
--- a/packages/astro/src/assets/build/generate.ts
+++ b/packages/astro/src/assets/build/generate.ts
@@ -1,6 +1,6 @@
import fs, { readFileSync } from 'node:fs';
import { basename, join } from 'node:path/posix';
-import type { BuildPipeline } from '../../core/build/buildPipeline';
+import type { BuildPipeline } from '../../core/build/buildPipeline.js';
import { prependForwardSlash } from '../../core/path.js';
import { isServerLikeOutput } from '../../prerender/utils.js';
import { getConfiguredImageService, isESMImportedImage } from '../internal.js';
diff --git a/packages/astro/src/assets/services/vendor/squoosh/codecs.ts b/packages/astro/src/assets/services/vendor/squoosh/codecs.ts
index 55b56d596..80aae7520 100644
--- a/packages/astro/src/assets/services/vendor/squoosh/codecs.ts
+++ b/packages/astro/src/assets/services/vendor/squoosh/codecs.ts
@@ -33,7 +33,7 @@ export interface RotateOptions {
}
// MozJPEG
-import type { MozJPEGModule as MozJPEGEncodeModule } from './mozjpeg/mozjpeg_enc'
+import type { MozJPEGModule as MozJPEGEncodeModule } from './mozjpeg/mozjpeg_enc.js'
import mozDec from './mozjpeg/mozjpeg_node_dec.js'
import mozDecWasm from './mozjpeg/mozjpeg_node_dec.wasm.js'
@@ -41,7 +41,7 @@ import mozEnc from './mozjpeg/mozjpeg_node_enc.js'
import mozEncWasm from './mozjpeg/mozjpeg_node_enc.wasm.js'
// WebP
-import type { WebPModule as WebPEncodeModule } from './webp/webp_enc'
+import type { WebPModule as WebPEncodeModule } from './webp/webp_enc.js'
import webpDec from './webp/webp_node_dec.js'
import webpDecWasm from './webp/webp_node_dec.wasm.js'
@@ -49,7 +49,7 @@ import webpEnc from './webp/webp_node_enc.js'
import webpEncWasm from './webp/webp_node_enc.wasm.js'
// AVIF
-import type { AVIFModule as AVIFEncodeModule } from './avif/avif_enc'
+import type { AVIFModule as AVIFEncodeModule } from './avif/avif_enc.js'
import avifDec from './avif/avif_node_dec.js'
import avifDecWasm from './avif/avif_node_dec.wasm.js'
diff --git a/packages/astro/src/assets/vendor/image-size/types/bmp.ts b/packages/astro/src/assets/vendor/image-size/types/bmp.ts
index 2f55ccdd1..e411bb561 100644
--- a/packages/astro/src/assets/vendor/image-size/types/bmp.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/bmp.ts
@@ -1,4 +1,4 @@
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
export const BMP: IImage = {
validate(buffer) {
diff --git a/packages/astro/src/assets/vendor/image-size/types/cur.ts b/packages/astro/src/assets/vendor/image-size/types/cur.ts
index 42766baec..4f612dcbb 100644
--- a/packages/astro/src/assets/vendor/image-size/types/cur.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/cur.ts
@@ -1,5 +1,5 @@
import { ICO } from './ico.js'
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
const TYPE_CURSOR = 2
export const CUR: IImage = {
diff --git a/packages/astro/src/assets/vendor/image-size/types/dds.ts b/packages/astro/src/assets/vendor/image-size/types/dds.ts
index e9ceb63ba..a9f33e046 100644
--- a/packages/astro/src/assets/vendor/image-size/types/dds.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/dds.ts
@@ -1,4 +1,4 @@
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
export const DDS: IImage = {
validate(buffer) {
diff --git a/packages/astro/src/assets/vendor/image-size/types/gif.ts b/packages/astro/src/assets/vendor/image-size/types/gif.ts
index b18b305f1..b49fc27c6 100644
--- a/packages/astro/src/assets/vendor/image-size/types/gif.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/gif.ts
@@ -1,4 +1,4 @@
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
const gifRegexp = /^GIF8[79]a/
export const GIF: IImage = {
diff --git a/packages/astro/src/assets/vendor/image-size/types/icns.ts b/packages/astro/src/assets/vendor/image-size/types/icns.ts
index 5beccb02c..59e5a8425 100644
--- a/packages/astro/src/assets/vendor/image-size/types/icns.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/icns.ts
@@ -1,4 +1,4 @@
-import type { IImage, ISize } from './interface'
+import type { IImage, ISize } from './interface.js'
/**
* ICNS Header
diff --git a/packages/astro/src/assets/vendor/image-size/types/ico.ts b/packages/astro/src/assets/vendor/image-size/types/ico.ts
index 09310176f..17cc778bb 100644
--- a/packages/astro/src/assets/vendor/image-size/types/ico.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/ico.ts
@@ -1,4 +1,4 @@
-import type { IImage, ISize, ISizeCalculationResult } from './interface'
+import type { IImage, ISize, ISizeCalculationResult } from './interface.js'
const TYPE_ICON = 1
diff --git a/packages/astro/src/assets/vendor/image-size/types/j2c.ts b/packages/astro/src/assets/vendor/image-size/types/j2c.ts
index 301c38cb6..26c582714 100644
--- a/packages/astro/src/assets/vendor/image-size/types/j2c.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/j2c.ts
@@ -1,4 +1,4 @@
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
export const J2C: IImage = {
validate(buffer) {
diff --git a/packages/astro/src/assets/vendor/image-size/types/jp2.ts b/packages/astro/src/assets/vendor/image-size/types/jp2.ts
index 127a96d60..0b8d01625 100644
--- a/packages/astro/src/assets/vendor/image-size/types/jp2.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/jp2.ts
@@ -1,4 +1,4 @@
-import type { IImage, ISize } from './interface'
+import type { IImage, ISize } from './interface.js'
const BoxTypes = {
ftyp: '66747970',
diff --git a/packages/astro/src/assets/vendor/image-size/types/jpg.ts b/packages/astro/src/assets/vendor/image-size/types/jpg.ts
index 68c32b7be..c06302e48 100644
--- a/packages/astro/src/assets/vendor/image-size/types/jpg.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/jpg.ts
@@ -4,7 +4,7 @@
// if this range we can't detect the file size correctly.
import { readUInt } from '../readUInt.js'
-import type { IImage, ISize } from './interface'
+import type { IImage, ISize } from './interface.js'
const EXIF_MARKER = '45786966'
const APP1_DATA_SIZE_BYTES = 2
diff --git a/packages/astro/src/assets/vendor/image-size/types/ktx.ts b/packages/astro/src/assets/vendor/image-size/types/ktx.ts
index 9e43fdeaa..080bc261f 100644
--- a/packages/astro/src/assets/vendor/image-size/types/ktx.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/ktx.ts
@@ -1,4 +1,4 @@
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
const SIGNATURE = 'KTX 11'
diff --git a/packages/astro/src/assets/vendor/image-size/types/png.ts b/packages/astro/src/assets/vendor/image-size/types/png.ts
index a31411380..7c70025da 100644
--- a/packages/astro/src/assets/vendor/image-size/types/png.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/png.ts
@@ -1,4 +1,4 @@
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
const pngSignature = 'PNG\r\n\x1a\n'
const pngImageHeaderChunkName = 'IHDR'
diff --git a/packages/astro/src/assets/vendor/image-size/types/pnm.ts b/packages/astro/src/assets/vendor/image-size/types/pnm.ts
index fa30a53d5..8f1765aa7 100644
--- a/packages/astro/src/assets/vendor/image-size/types/pnm.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/pnm.ts
@@ -1,4 +1,4 @@
-import type { IImage, ISize } from './interface'
+import type { IImage, ISize } from './interface.js'
const PNMTypes: { [signature: string]: string } = {
P1: 'pbm/ascii',
diff --git a/packages/astro/src/assets/vendor/image-size/types/psd.ts b/packages/astro/src/assets/vendor/image-size/types/psd.ts
index 7521f5e9f..c88855fe7 100644
--- a/packages/astro/src/assets/vendor/image-size/types/psd.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/psd.ts
@@ -1,4 +1,4 @@
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
export const PSD: IImage = {
validate(buffer) {
diff --git a/packages/astro/src/assets/vendor/image-size/types/svg.ts b/packages/astro/src/assets/vendor/image-size/types/svg.ts
index 945be962d..50c485683 100644
--- a/packages/astro/src/assets/vendor/image-size/types/svg.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/svg.ts
@@ -1,4 +1,4 @@
-import type { IImage, ISize } from './interface'
+import type { IImage, ISize } from './interface.js'
interface IAttributes {
width: number | null
diff --git a/packages/astro/src/assets/vendor/image-size/types/tiff.ts b/packages/astro/src/assets/vendor/image-size/types/tiff.ts
index ae228c1b8..c5f76f80e 100644
--- a/packages/astro/src/assets/vendor/image-size/types/tiff.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/tiff.ts
@@ -2,7 +2,7 @@
// TO-DO: support big-endian as well
import * as fs from 'node:fs'
import { readUInt } from '../readUInt.js'
-import type { IImage } from './interface'
+import type { IImage } from './interface.js'
// Read IFD (image-file-directory) into a buffer
function readIFD(buffer: Buffer, filepath: string, isBigEndian: boolean) {
diff --git a/packages/astro/src/assets/vendor/image-size/types/webp.ts b/packages/astro/src/assets/vendor/image-size/types/webp.ts
index aaafbf12d..6592d87fb 100644
--- a/packages/astro/src/assets/vendor/image-size/types/webp.ts
+++ b/packages/astro/src/assets/vendor/image-size/types/webp.ts
@@ -1,5 +1,5 @@
// based on https://developers.google.com/speed/webp/docs/riff_container
-import type { IImage, ISize } from './interface'
+import type { IImage, ISize } from './interface.js'
function calculateExtended(buffer: Buffer): ISize {
return {
diff --git a/packages/astro/src/assets/vite-plugin-assets.ts b/packages/astro/src/assets/vite-plugin-assets.ts
index f114e7ef8..300263ada 100644
--- a/packages/astro/src/assets/vite-plugin-assets.ts
+++ b/packages/astro/src/assets/vite-plugin-assets.ts
@@ -1,7 +1,7 @@
import MagicString from 'magic-string';
import type * as vite from 'vite';
import { normalizePath } from 'vite';
-import type { AstroPluginOptions, ImageTransform } from '../@types/astro';
+import type { AstroPluginOptions, ImageTransform } from '../@types/astro.js';
import {
appendForwardSlash,
joinPaths,
diff --git a/packages/astro/src/cli/add/babel.ts b/packages/astro/src/cli/add/babel.ts
index 7da8eed6c..facaabd54 100644
--- a/packages/astro/src/cli/add/babel.ts
+++ b/packages/astro/src/cli/add/babel.ts
@@ -3,13 +3,11 @@ import parser from '@babel/parser';
import traverse from '@babel/traverse';
import * as t from '@babel/types';
-// @ts-expect-error @babel/traverse isn't ESM and needs this trick
-export const visit = traverse.default as typeof traverse;
+export const visit = traverse.default;
export { t };
export async function generate(ast: t.File) {
- // @ts-expect-error @babel/generator isn't ESM and needs this trick
- const astToText = generator.default as typeof generator;
+ const astToText = generator.default;
const { code } = astToText(ast);
return code;
}
diff --git a/packages/astro/src/config/index.ts b/packages/astro/src/config/index.ts
index 5b8ba3824..8625140ea 100644
--- a/packages/astro/src/config/index.ts
+++ b/packages/astro/src/config/index.ts
@@ -1,5 +1,5 @@
import type { UserConfig } from 'vite';
-import type { AstroUserConfig } from '../@types/astro';
+import type { AstroUserConfig } from '../@types/astro.js';
import { Logger } from '../core/logger/core.js';
export function defineConfig(config: AstroUserConfig) {
diff --git a/packages/astro/src/config/vite-plugin-content-listen.ts b/packages/astro/src/config/vite-plugin-content-listen.ts
index bb3cd9d2b..1b65c5bfb 100644
--- a/packages/astro/src/config/vite-plugin-content-listen.ts
+++ b/packages/astro/src/config/vite-plugin-content-listen.ts
@@ -1,6 +1,6 @@
import type fsMod from 'node:fs';
import type { Plugin, ViteDevServer } from 'vite';
-import type { AstroSettings } from '../@types/astro';
+import type { AstroSettings } from '../@types/astro.js';
import { attachContentServerListeners } from '../content/server-listeners.js';
import type { Logger } from '../core/logger/core.js';
diff --git a/packages/astro/src/content/types-generator.ts b/packages/astro/src/content/types-generator.ts
index 8900419d8..046b73b1c 100644
--- a/packages/astro/src/content/types-generator.ts
+++ b/packages/astro/src/content/types-generator.ts
@@ -7,7 +7,7 @@ import { normalizePath, type ViteDevServer } from 'vite';
import type { AstroSettings, ContentEntryType } from '../@types/astro.js';
import { AstroError } from '../core/errors/errors.js';
import { AstroErrorData } from '../core/errors/index.js';
-import type { Logger } from '../core/logger/core';
+import type { Logger } from '../core/logger/core.js';
import { isRelativePath } from '../core/path.js';
import { CONTENT_TYPES_FILE, VIRTUAL_MODULE_ID } from './consts.js';
import {
diff --git a/packages/astro/src/content/vite-plugin-content-assets.ts b/packages/astro/src/content/vite-plugin-content-assets.ts
index 38e1bdc44..5d82a684f 100644
--- a/packages/astro/src/content/vite-plugin-content-assets.ts
+++ b/packages/astro/src/content/vite-plugin-content-assets.ts
@@ -5,7 +5,7 @@ import type { AstroSettings } from '../@types/astro.js';
import { moduleIsTopLevelPage, walkParentInfos } from '../core/build/graph.js';
import { getPageDataByViteID, type BuildInternals } from '../core/build/internal.js';
import type { AstroBuildPlugin } from '../core/build/plugin.js';
-import type { StaticBuildOptions } from '../core/build/types';
+import type { StaticBuildOptions } from '../core/build/types.js';
import type { ModuleLoader } from '../core/module-loader/loader.js';
import { createViteLoader } from '../core/module-loader/vite.js';
import { joinPaths, prependForwardSlash } from '../core/path.js';
diff --git a/packages/astro/src/core/app/common.ts b/packages/astro/src/core/app/common.ts
index 58898b2fe..5426d7721 100644
--- a/packages/astro/src/core/app/common.ts
+++ b/packages/astro/src/core/app/common.ts
@@ -1,5 +1,5 @@
import { deserializeRouteData } from '../routing/manifest/serialization.js';
-import type { RouteInfo, SerializedSSRManifest, SSRManifest } from './types';
+import type { RouteInfo, SerializedSSRManifest, SSRManifest } from './types.js';
export function deserializeManifest(serializedManifest: SerializedSSRManifest): SSRManifest {
const routes: RouteInfo[] = [];
diff --git a/packages/astro/src/core/app/index.ts b/packages/astro/src/core/app/index.ts
index 1c0b13148..9cf01f82d 100644
--- a/packages/astro/src/core/app/index.ts
+++ b/packages/astro/src/core/app/index.ts
@@ -5,8 +5,8 @@ import type {
RouteData,
SSRElement,
SSRManifest,
-} from '../../@types/astro';
-import type { SinglePageBuiltModule } from '../build/types';
+} from '../../@types/astro.js';
+import type { SinglePageBuiltModule } from '../build/types.js';
import { getSetCookiesFromResponse } from '../cookies/index.js';
import { consoleLogDestination } from '../logger/console.js';
import { AstroIntegrationLogger, Logger } from '../logger/core.js';
@@ -25,7 +25,7 @@ import {
} from '../render/ssr-element.js';
import { matchRoute } from '../routing/match.js';
import { EndpointNotFoundError, SSRRoutePipeline } from './ssrPipeline.js';
-import type { RouteInfo } from './types';
+import type { RouteInfo } from './types.js';
export { deserializeManifest } from './common.js';
const clientLocalsSymbol = Symbol.for('astro.locals');
diff --git a/packages/astro/src/core/app/node.ts b/packages/astro/src/core/app/node.ts
index 054064a08..1df931eca 100644
--- a/packages/astro/src/core/app/node.ts
+++ b/packages/astro/src/core/app/node.ts
@@ -1,5 +1,5 @@
-import type { RouteData } from '../../@types/astro';
-import type { SerializedSSRManifest, SSRManifest } from './types';
+import type { RouteData } from '../../@types/astro.js';
+import type { SerializedSSRManifest, SSRManifest } from './types.js';
import * as fs from 'node:fs';
import { IncomingMessage } from 'node:http';
diff --git a/packages/astro/src/core/app/ssrPipeline.ts b/packages/astro/src/core/app/ssrPipeline.ts
index 964c9f8c7..94e8c9139 100644
--- a/packages/astro/src/core/app/ssrPipeline.ts
+++ b/packages/astro/src/core/app/ssrPipeline.ts
@@ -1,5 +1,5 @@
import { Pipeline } from '../pipeline.js';
-import type { Environment } from '../render';
+import type { Environment } from '../render/index.js';
/**
* Thrown when an endpoint contains a response with the header "X-Astro-Response" === 'Not-Found'
diff --git a/packages/astro/src/core/app/types.ts b/packages/astro/src/core/app/types.ts
index 8812d2c44..0050b5d7a 100644
--- a/packages/astro/src/core/app/types.ts
+++ b/packages/astro/src/core/app/types.ts
@@ -4,8 +4,8 @@ import type {
SSRComponentMetadata,
SSRLoadedRenderer,
SSRResult,
-} from '../../@types/astro';
-import type { SinglePageBuiltModule } from '../build/types';
+} from '../../@types/astro.js';
+import type { SinglePageBuiltModule } from '../build/types.js';
export type ComponentPath = string;
diff --git a/packages/astro/src/core/build/buildPipeline.ts b/packages/astro/src/core/build/buildPipeline.ts
index bdf9c7706..d38361c36 100644
--- a/packages/astro/src/core/build/buildPipeline.ts
+++ b/packages/astro/src/core/build/buildPipeline.ts
@@ -1,16 +1,16 @@
-import type { AstroConfig, AstroSettings, SSRLoadedRenderer } from '../../@types/astro';
+import type { AstroConfig, AstroSettings, SSRLoadedRenderer } from '../../@types/astro.js';
import { getOutputDirectory, isServerLikeOutput } from '../../prerender/utils.js';
import { BEFORE_HYDRATION_SCRIPT_ID } from '../../vite-plugin-scripts/index.js';
-import type { SSRManifest } from '../app/types';
+import type { SSRManifest } from '../app/types.js';
import { Logger } from '../logger/core.js';
import { Pipeline } from '../pipeline.js';
import { createEnvironment } from '../render/index.js';
import { createAssetLink } from '../render/ssr-element.js';
-import type { BuildInternals } from './internal';
+import type { BuildInternals } from './internal.js';
import { ASTRO_PAGE_RESOLVED_MODULE_ID } from './plugins/plugin-pages.js';
import { RESOLVED_SPLIT_MODULE_ID } from './plugins/plugin-ssr.js';
import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js';
-import type { PageBuildData, StaticBuildOptions } from './types';
+import type { PageBuildData, StaticBuildOptions } from './types.js';
/**
* This pipeline is responsible to gather the files emitted by the SSR build and generate the pages by executing these files.
diff --git a/packages/astro/src/core/build/common.ts b/packages/astro/src/core/build/common.ts
index a4ba0b4ca..5b3811f1d 100644
--- a/packages/astro/src/core/build/common.ts
+++ b/packages/astro/src/core/build/common.ts
@@ -1,6 +1,6 @@
import npath from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
-import type { AstroConfig, RouteType } from '../../@types/astro';
+import type { AstroConfig, RouteType } from '../../@types/astro.js';
import { appendForwardSlash } from '../../core/path.js';
const STATUS_CODE_PAGES = new Set(['/404', '/500']);
diff --git a/packages/astro/src/core/build/css-asset-name.ts b/packages/astro/src/core/build/css-asset-name.ts
index ace31c3ab..6e9e2a1c2 100644
--- a/packages/astro/src/core/build/css-asset-name.ts
+++ b/packages/astro/src/core/build/css-asset-name.ts
@@ -2,7 +2,7 @@ import type { GetModuleInfo } from 'rollup';
import crypto from 'node:crypto';
import npath from 'node:path';
-import type { AstroSettings } from '../../@types/astro';
+import type { AstroSettings } from '../../@types/astro.js';
import { viteID } from '../util.js';
import { getTopLevelPages } from './graph.js';
diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts
index f1044434b..5dd6af021 100644
--- a/packages/astro/src/core/build/generate.ts
+++ b/packages/astro/src/core/build/generate.ts
@@ -16,7 +16,7 @@ import type {
SSRError,
SSRLoadedRenderer,
SSRManifest,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import {
generateImage as generateImageInternal,
getStaticImageList,
@@ -57,7 +57,7 @@ import type {
SinglePageBuiltModule,
StaticBuildOptions,
StylesheetAsset,
-} from './types';
+} from './types.js';
import { getTimeStat } from './util.js';
function createEntryURL(filePath: string, outFolder: URL) {
diff --git a/packages/astro/src/core/build/index.ts b/packages/astro/src/core/build/index.ts
index 5280e69e3..aefea5080 100644
--- a/packages/astro/src/core/build/index.ts
+++ b/packages/astro/src/core/build/index.ts
@@ -9,7 +9,7 @@ import type {
AstroSettings,
ManifestData,
RuntimeMode,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { injectImageEndpoint } from '../../assets/internal.js';
import { telemetry } from '../../events/index.js';
import { eventCliSession } from '../../events/session.js';
diff --git a/packages/astro/src/core/build/internal.ts b/packages/astro/src/core/build/internal.ts
index c1123e36b..55cff37f3 100644
--- a/packages/astro/src/core/build/internal.ts
+++ b/packages/astro/src/core/build/internal.ts
@@ -1,6 +1,6 @@
import type { Rollup } from 'vite';
-import type { RouteData, SSRResult } from '../../@types/astro';
-import type { PageOptions } from '../../vite-plugin-astro/types';
+import type { RouteData, SSRResult } from '../../@types/astro.js';
+import type { PageOptions } from '../../vite-plugin-astro/types.js';
import { prependForwardSlash, removeFileExtension } from '../path.js';
import { viteID } from '../util.js';
import {
@@ -9,7 +9,7 @@ import {
} from './plugins/plugin-pages.js';
import { RESOLVED_SPLIT_MODULE_ID } from './plugins/plugin-ssr.js';
import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js';
-import type { PageBuildData, StylesheetAsset, ViteID } from './types';
+import type { PageBuildData, StylesheetAsset, ViteID } from './types.js';
export interface BuildInternals {
/**
diff --git a/packages/astro/src/core/build/page-data.ts b/packages/astro/src/core/build/page-data.ts
index ea75a0c0b..da002a051 100644
--- a/packages/astro/src/core/build/page-data.ts
+++ b/packages/astro/src/core/build/page-data.ts
@@ -1,6 +1,6 @@
-import type { AstroSettings, ManifestData } from '../../@types/astro';
-import type { Logger } from '../logger/core';
-import type { AllPagesData } from './types';
+import type { AstroSettings, ManifestData } from '../../@types/astro.js';
+import type { Logger } from '../logger/core.js';
+import type { AllPagesData } from './types.js';
import * as colors from 'kleur/colors';
import { debug } from '../logger/core.js';
diff --git a/packages/astro/src/core/build/plugin.ts b/packages/astro/src/core/build/plugin.ts
index e7b1fbc4a..c5da47457 100644
--- a/packages/astro/src/core/build/plugin.ts
+++ b/packages/astro/src/core/build/plugin.ts
@@ -1,6 +1,6 @@
import type { Plugin as VitePlugin } from 'vite';
-import type { BuildInternals } from './internal';
-import type { StaticBuildOptions, ViteBuildReturn } from './types';
+import type { BuildInternals } from './internal.js';
+import type { StaticBuildOptions, ViteBuildReturn } from './types.js';
type RollupOutputArray = Extract<ViteBuildReturn, Array<any>>;
type OutputChunkorAsset = RollupOutputArray[number]['output'][number];
diff --git a/packages/astro/src/core/build/plugins/index.ts b/packages/astro/src/core/build/plugins/index.ts
index 600e083e2..90620cb28 100644
--- a/packages/astro/src/core/build/plugins/index.ts
+++ b/packages/astro/src/core/build/plugins/index.ts
@@ -1,6 +1,6 @@
import { astroConfigBuildPlugin } from '../../../content/vite-plugin-content-assets.js';
import { astroHeadBuildPlugin } from '../../../vite-plugin-head/index.js';
-import type { AstroBuildPluginContainer } from '../plugin';
+import type { AstroBuildPluginContainer } from '../plugin.js';
import { pluginAliasResolve } from './plugin-alias-resolve.js';
import { pluginAnalyzer } from './plugin-analyzer.js';
import { pluginComponentEntry } from './plugin-component-entry.js';
diff --git a/packages/astro/src/core/build/plugins/plugin-analyzer.ts b/packages/astro/src/core/build/plugins/plugin-analyzer.ts
index 8483748bc..b81932dce 100644
--- a/packages/astro/src/core/build/plugins/plugin-analyzer.ts
+++ b/packages/astro/src/core/build/plugins/plugin-analyzer.ts
@@ -1,6 +1,6 @@
import type { ModuleInfo, PluginContext } from 'rollup';
import type { Plugin as VitePlugin } from 'vite';
-import type { PluginMetadata as AstroPluginMetadata } from '../../../vite-plugin-astro/types';
+import type { PluginMetadata as AstroPluginMetadata } from '../../../vite-plugin-astro/types.js';
import type { BuildInternals } from '../internal.js';
import type { AstroBuildPlugin } from '../plugin.js';
diff --git a/packages/astro/src/core/build/plugins/plugin-css.ts b/packages/astro/src/core/build/plugins/plugin-css.ts
index b72acd27e..d85dc8e56 100644
--- a/packages/astro/src/core/build/plugins/plugin-css.ts
+++ b/packages/astro/src/core/build/plugins/plugin-css.ts
@@ -3,9 +3,9 @@ import * as npath from 'node:path';
import type { GetModuleInfo } from 'rollup';
import { type ResolvedConfig, type Plugin as VitePlugin } from 'vite';
import { isBuildableCSSRequest } from '../../../vite-plugin-astro-server/util.js';
-import type { BuildInternals } from '../internal';
-import type { AstroBuildPlugin } from '../plugin';
-import type { PageBuildData, StaticBuildOptions, StylesheetAsset } from '../types';
+import type { BuildInternals } from '../internal.js';
+import type { AstroBuildPlugin } from '../plugin.js';
+import type { PageBuildData, StaticBuildOptions, StylesheetAsset } from '../types.js';
import { PROPAGATED_ASSET_FLAG } from '../../../content/consts.js';
import * as assetName from '../css-asset-name.js';
diff --git a/packages/astro/src/core/build/plugins/plugin-hoisted-scripts.ts b/packages/astro/src/core/build/plugins/plugin-hoisted-scripts.ts
index d31e42807..5c6b40992 100644
--- a/packages/astro/src/core/build/plugins/plugin-hoisted-scripts.ts
+++ b/packages/astro/src/core/build/plugins/plugin-hoisted-scripts.ts
@@ -1,10 +1,10 @@
import type { Plugin as VitePlugin } from 'vite';
-import type { AstroSettings } from '../../../@types/astro';
+import type { AstroSettings } from '../../../@types/astro.js';
import { viteID } from '../../util.js';
import type { BuildInternals } from '../internal.js';
import { getPageDataByViteID } from '../internal.js';
-import type { AstroBuildPlugin } from '../plugin';
-import type { OutputChunk, StaticBuildOptions } from '../types';
+import type { AstroBuildPlugin } from '../plugin.js';
+import type { OutputChunk, StaticBuildOptions } from '../types.js';
function virtualHoistedEntry(id: string) {
return id.startsWith('/astro/hoisted.js?q=');
diff --git a/packages/astro/src/core/build/plugins/plugin-internals.ts b/packages/astro/src/core/build/plugins/plugin-internals.ts
index 6bf00f9dc..03e6dfb37 100644
--- a/packages/astro/src/core/build/plugins/plugin-internals.ts
+++ b/packages/astro/src/core/build/plugins/plugin-internals.ts
@@ -1,6 +1,6 @@
import type { Plugin as VitePlugin } from 'vite';
import type { BuildInternals } from '../internal.js';
-import type { AstroBuildPlugin } from '../plugin';
+import type { AstroBuildPlugin } from '../plugin.js';
import { normalizeEntryId } from './plugin-component-entry.js';
export function vitePluginInternals(input: Set<string>, internals: BuildInternals): VitePlugin {
diff --git a/packages/astro/src/core/build/plugins/plugin-manifest.ts b/packages/astro/src/core/build/plugins/plugin-manifest.ts
index 5a1a3ce76..41ceb282c 100644
--- a/packages/astro/src/core/build/plugins/plugin-manifest.ts
+++ b/packages/astro/src/core/build/plugins/plugin-manifest.ts
@@ -4,14 +4,14 @@ import type { OutputChunk } from 'rollup';
import { type Plugin as VitePlugin } from 'vite';
import { runHookBuildSsr } from '../../../integrations/index.js';
import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js';
-import type { SerializedRouteInfo, SerializedSSRManifest } from '../../app/types';
+import type { SerializedRouteInfo, SerializedSSRManifest } from '../../app/types.js';
import { joinPaths, prependForwardSlash } from '../../path.js';
import { serializeRouteData } from '../../routing/index.js';
import { addRollupInput } from '../add-rollup-input.js';
import { getOutFile, getOutFolder } from '../common.js';
import { cssOrder, mergeInlineCss, type BuildInternals } from '../internal.js';
-import type { AstroBuildPlugin } from '../plugin';
-import type { StaticBuildOptions } from '../types';
+import type { AstroBuildPlugin } from '../plugin.js';
+import type { StaticBuildOptions } from '../types.js';
const manifestReplace = '@@ASTRO_MANIFEST_REPLACE@@';
const replaceExp = new RegExp(`['"](${manifestReplace})['"]`, 'g');
@@ -46,8 +46,8 @@ function vitePluginManifest(options: StaticBuildOptions, internals: BuildInterna
`import { _privateSetManifestDontUseThis } from 'astro:ssr-manifest'`
);
- contents.push(`
-const manifest = _deserializeManifest('${manifestReplace}');
+ contents.push(`
+const manifest = _deserializeManifest('${manifestReplace}');
_privateSetManifestDontUseThis(manifest);
`);
diff --git a/packages/astro/src/core/build/plugins/plugin-middleware.ts b/packages/astro/src/core/build/plugins/plugin-middleware.ts
index 99853c7b1..47ff4b863 100644
--- a/packages/astro/src/core/build/plugins/plugin-middleware.ts
+++ b/packages/astro/src/core/build/plugins/plugin-middleware.ts
@@ -2,9 +2,9 @@ import type { Plugin as VitePlugin } from 'vite';
import { getOutputDirectory } from '../../../prerender/utils.js';
import { MIDDLEWARE_PATH_SEGMENT_NAME } from '../../constants.js';
import { addRollupInput } from '../add-rollup-input.js';
-import type { BuildInternals } from '../internal';
-import type { AstroBuildPlugin } from '../plugin';
-import type { StaticBuildOptions } from '../types';
+import type { BuildInternals } from '../internal.js';
+import type { AstroBuildPlugin } from '../plugin.js';
+import type { StaticBuildOptions } from '../types.js';
export const MIDDLEWARE_MODULE_ID = '@astro-middleware';
diff --git a/packages/astro/src/core/build/plugins/plugin-pages.ts b/packages/astro/src/core/build/plugins/plugin-pages.ts
index 13891f812..00401285f 100644
--- a/packages/astro/src/core/build/plugins/plugin-pages.ts
+++ b/packages/astro/src/core/build/plugins/plugin-pages.ts
@@ -1,11 +1,11 @@
import { extname } from 'node:path';
import type { Plugin as VitePlugin } from 'vite';
-import type { AstroSettings } from '../../../@types/astro';
+import type { AstroSettings } from '../../../@types/astro.js';
import { routeIsRedirect } from '../../redirects/index.js';
import { addRollupInput } from '../add-rollup-input.js';
import { type BuildInternals } from '../internal.js';
-import type { AstroBuildPlugin } from '../plugin';
-import type { StaticBuildOptions } from '../types';
+import type { AstroBuildPlugin } from '../plugin.js';
+import type { StaticBuildOptions } from '../types.js';
import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js';
import { RENDERERS_MODULE_ID } from './plugin-renderers.js';
import { ASTRO_PAGE_EXTENSION_POST_PATTERN, getPathFromVirtualModulePageName } from './util.js';
diff --git a/packages/astro/src/core/build/plugins/plugin-prerender.ts b/packages/astro/src/core/build/plugins/plugin-prerender.ts
index 402264c6e..35e4813fc 100644
--- a/packages/astro/src/core/build/plugins/plugin-prerender.ts
+++ b/packages/astro/src/core/build/plugins/plugin-prerender.ts
@@ -3,7 +3,7 @@ import type { Plugin as VitePlugin } from 'vite';
import { getPrerenderMetadata } from '../../../prerender/metadata.js';
import type { BuildInternals } from '../internal.js';
import type { AstroBuildPlugin } from '../plugin.js';
-import type { StaticBuildOptions } from '../types';
+import type { StaticBuildOptions } from '../types.js';
import { extendManualChunks } from './util.js';
function vitePluginPrerender(opts: StaticBuildOptions, internals: BuildInternals): VitePlugin {
diff --git a/packages/astro/src/core/build/plugins/plugin-renderers.ts b/packages/astro/src/core/build/plugins/plugin-renderers.ts
index f0cdf8983..6cb45dc59 100644
--- a/packages/astro/src/core/build/plugins/plugin-renderers.ts
+++ b/packages/astro/src/core/build/plugins/plugin-renderers.ts
@@ -1,7 +1,7 @@
import type { Plugin as VitePlugin } from 'vite';
import { addRollupInput } from '../add-rollup-input.js';
-import type { AstroBuildPlugin } from '../plugin';
-import type { StaticBuildOptions } from '../types';
+import type { AstroBuildPlugin } from '../plugin.js';
+import type { StaticBuildOptions } from '../types.js';
export const RENDERERS_MODULE_ID = '@astro-renderers';
export const RESOLVED_RENDERERS_MODULE_ID = `\0${RENDERERS_MODULE_ID}`;
diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts
index 33462050a..1887351b1 100644
--- a/packages/astro/src/core/build/plugins/plugin-ssr.ts
+++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts
@@ -1,14 +1,14 @@
import { join } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
import type { Plugin as VitePlugin } from 'vite';
-import type { AstroAdapter, AstroConfig } from '../../../@types/astro';
+import type { AstroAdapter, AstroConfig } from '../../../@types/astro.js';
import { isFunctionPerRouteEnabled } from '../../../integrations/index.js';
import { isServerLikeOutput } from '../../../prerender/utils.js';
import { routeIsRedirect } from '../../redirects/index.js';
import { addRollupInput } from '../add-rollup-input.js';
import type { BuildInternals } from '../internal.js';
-import type { AstroBuildPlugin } from '../plugin';
-import type { StaticBuildOptions } from '../types';
+import type { AstroBuildPlugin } from '../plugin.js';
+import type { StaticBuildOptions } from '../types.js';
import { SSR_MANIFEST_VIRTUAL_MODULE_ID } from './plugin-manifest.js';
import { ASTRO_PAGE_MODULE_ID } from './plugin-pages.js';
import { RENDERERS_MODULE_ID } from './plugin-renderers.js';
@@ -246,8 +246,8 @@ function generateSSRCode(config: AstroConfig, adapter: AstroAdapter) {
}
contents.push(`import * as adapter from '${adapter.serverEntrypoint}';
-import { renderers } from '${RENDERERS_MODULE_ID}';
-import { manifest as defaultManifest} from '${SSR_MANIFEST_VIRTUAL_MODULE_ID}';
+import { renderers } from '${RENDERERS_MODULE_ID}';
+import { manifest as defaultManifest} from '${SSR_MANIFEST_VIRTUAL_MODULE_ID}';
const _manifest = Object.assign(defaultManifest, {
${pageMap},
renderers,
diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts
index c37ad542e..2d4f41f48 100644
--- a/packages/astro/src/core/build/static-build.ts
+++ b/packages/astro/src/core/build/static-build.ts
@@ -6,7 +6,7 @@ import fs from 'node:fs';
import path, { extname } from 'node:path';
import { fileURLToPath } from 'node:url';
import * as vite from 'vite';
-import type { RouteData } from '../../@types/astro';
+import type { RouteData } from '../../@types/astro.js';
import {
createBuildInternals,
eachPageData,
@@ -30,7 +30,7 @@ import { ASTRO_PAGE_RESOLVED_MODULE_ID } from './plugins/plugin-pages.js';
import { RESOLVED_RENDERERS_MODULE_ID } from './plugins/plugin-renderers.js';
import { RESOLVED_SPLIT_MODULE_ID, RESOLVED_SSR_VIRTUAL_MODULE_ID } from './plugins/plugin-ssr.js';
import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js';
-import type { PageBuildData, StaticBuildOptions } from './types';
+import type { PageBuildData, StaticBuildOptions } from './types.js';
import { getTimeStat } from './util.js';
export async function viteBuild(opts: StaticBuildOptions) {
diff --git a/packages/astro/src/core/build/types.ts b/packages/astro/src/core/build/types.ts
index 07f2404bc..a51fc8d00 100644
--- a/packages/astro/src/core/build/types.ts
+++ b/packages/astro/src/core/build/types.ts
@@ -1,4 +1,5 @@
-import type { InlineConfig, default as vite } from 'vite';
+import type * as vite from 'vite';
+import type { InlineConfig } from 'vite';
import type {
AstroConfig,
AstroSettings,
@@ -8,9 +9,9 @@ import type {
RouteData,
RuntimeMode,
SSRLoadedRenderer,
-} from '../../@types/astro';
-import type { Logger } from '../logger/core';
-import type { RouteCache } from '../render/route-cache';
+} from '../../@types/astro.js';
+import type { Logger } from '../logger/core.js';
+import type { RouteCache } from '../render/route-cache.js';
export type ComponentPath = string;
export type ViteID = string;
diff --git a/packages/astro/src/core/compile/cache.ts b/packages/astro/src/core/compile/cache.ts
index 673eabd0b..cdd9ddd55 100644
--- a/packages/astro/src/core/compile/cache.ts
+++ b/packages/astro/src/core/compile/cache.ts
@@ -1,4 +1,4 @@
-import type { AstroConfig } from '../../@types/astro';
+import type { AstroConfig } from '../../@types/astro.js';
import { compile, type CompileProps, type CompileResult } from './compile.js';
type CompilationCache = Map<string, CompileResult>;
diff --git a/packages/astro/src/core/compile/compile.ts b/packages/astro/src/core/compile/compile.ts
index d66a2d9c6..5e1cad1be 100644
--- a/packages/astro/src/core/compile/compile.ts
+++ b/packages/astro/src/core/compile/compile.ts
@@ -1,6 +1,6 @@
import type { TransformResult } from '@astrojs/compiler';
import type { ResolvedConfig } from 'vite';
-import type { AstroConfig } from '../../@types/astro';
+import type { AstroConfig } from '../../@types/astro.js';
import { transform } from '@astrojs/compiler';
import { fileURLToPath } from 'node:url';
diff --git a/packages/astro/src/core/compile/index.ts b/packages/astro/src/core/compile/index.ts
index 6851c7c5e..4a2094de7 100644
--- a/packages/astro/src/core/compile/index.ts
+++ b/packages/astro/src/core/compile/index.ts
@@ -4,5 +4,5 @@ export {
invalidateCompilation,
isCached,
} from './cache.js';
-export type { CompileProps, CompileResult } from './compile';
-export type { TransformStyle } from './types';
+export type { CompileProps, CompileResult } from './compile.js';
+export type { TransformStyle } from './types.js';
diff --git a/packages/astro/src/core/config/config.ts b/packages/astro/src/core/config/config.ts
index 16c7d28bc..d8fdd9bb0 100644
--- a/packages/astro/src/core/config/config.ts
+++ b/packages/astro/src/core/config/config.ts
@@ -5,7 +5,7 @@ import type {
AstroInlineOnlyConfig,
AstroUserConfig,
CLIFlags,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import * as colors from 'kleur/colors';
import fs from 'node:fs';
diff --git a/packages/astro/src/core/config/index.ts b/packages/astro/src/core/config/index.ts
index 758e832bf..4bb1f0537 100644
--- a/packages/astro/src/core/config/index.ts
+++ b/packages/astro/src/core/config/index.ts
@@ -1,6 +1,6 @@
export { resolveConfig, resolveConfigPath, resolveFlags, resolveRoot } from './config.js';
export { createNodeLogger } from './logging.js';
export { mergeConfig } from './merge.js';
-export type { AstroConfigType } from './schema';
+export type { AstroConfigType } from './schema.js';
export { createSettings } from './settings.js';
export { loadTSConfig, updateTSConfigForFramework } from './tsconfig.js';
diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts
index 46ed2a01f..3854f6d22 100644
--- a/packages/astro/src/core/config/schema.ts
+++ b/packages/astro/src/core/config/schema.ts
@@ -1,7 +1,7 @@
import type { RehypePlugin, RemarkPlugin, RemarkRehype } from '@astrojs/markdown-remark';
import { markdownConfigDefaults } from '@astrojs/markdown-remark';
import type { ILanguageRegistration, IShikiTheme, Theme } from 'shiki';
-import type { AstroUserConfig, ViteUserConfig } from '../../@types/astro';
+import type { AstroUserConfig, ViteUserConfig } from '../../@types/astro.js';
import type { OutgoingHttpHeaders } from 'node:http';
import path from 'node:path';
diff --git a/packages/astro/src/core/config/settings.ts b/packages/astro/src/core/config/settings.ts
index 30ca7c4c2..8b70f6e96 100644
--- a/packages/astro/src/core/config/settings.ts
+++ b/packages/astro/src/core/config/settings.ts
@@ -1,7 +1,7 @@
import yaml from 'js-yaml';
import path from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';
-import type { AstroConfig, AstroSettings } from '../../@types/astro';
+import type { AstroConfig, AstroSettings } from '../../@types/astro.js';
import { getContentPaths } from '../../content/index.js';
import { markdownContentEntryType } from '../../vite-plugin-markdown/content-entry-type.js';
import { getDefaultClientDirectives } from '../client-directive/index.js';
diff --git a/packages/astro/src/core/cookies/response.ts b/packages/astro/src/core/cookies/response.ts
index 668bd265f..8dc35e8c7 100644
--- a/packages/astro/src/core/cookies/response.ts
+++ b/packages/astro/src/core/cookies/response.ts
@@ -1,4 +1,4 @@
-import type { AstroCookies } from './cookies';
+import type { AstroCookies } from './cookies.js';
const astroCookiesSymbol = Symbol.for('astro.cookies');
diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts
index 8adf3cac8..5848bbe53 100644
--- a/packages/astro/src/core/create-vite.ts
+++ b/packages/astro/src/core/create-vite.ts
@@ -1,5 +1,5 @@
-import type { AstroSettings } from '../@types/astro';
-import type { Logger } from './logger/core';
+import type { AstroSettings } from '../@types/astro.js';
+import type { Logger } from './logger/core.js';
import nodeFs from 'node:fs';
import { fileURLToPath } from 'node:url';
@@ -168,7 +168,7 @@ export async function createVite(
{
// Typings are imported from 'astro' (e.g. import { Type } from 'astro')
find: /^astro$/,
- replacement: fileURLToPath(new URL('../@types/astro', import.meta.url)),
+ replacement: fileURLToPath(new URL('../@types/astro.js', import.meta.url)),
},
{
find: 'astro:middleware',
diff --git a/packages/astro/src/core/dev/container.ts b/packages/astro/src/core/dev/container.ts
index ed318622f..52dd4c1a4 100644
--- a/packages/astro/src/core/dev/container.ts
+++ b/packages/astro/src/core/dev/container.ts
@@ -1,6 +1,6 @@
import type * as http from 'node:http';
import type { AddressInfo } from 'node:net';
-import type { AstroInlineConfig, AstroSettings } from '../../@types/astro';
+import type { AstroInlineConfig, AstroSettings } from '../../@types/astro.js';
import nodeFs from 'node:fs';
import * as vite from 'vite';
diff --git a/packages/astro/src/core/dev/dev.ts b/packages/astro/src/core/dev/dev.ts
index 95555a533..02ba9d872 100644
--- a/packages/astro/src/core/dev/dev.ts
+++ b/packages/astro/src/core/dev/dev.ts
@@ -3,7 +3,7 @@ import type http from 'node:http';
import type { AddressInfo } from 'node:net';
import { performance } from 'perf_hooks';
import type * as vite from 'vite';
-import type { AstroInlineConfig } from '../../@types/astro';
+import type { AstroInlineConfig } from '../../@types/astro.js';
import { attachContentServerListeners } from '../../content/index.js';
import { telemetry } from '../../events/index.js';
import * as msg from '../messages.js';
diff --git a/packages/astro/src/core/dev/restart.ts b/packages/astro/src/core/dev/restart.ts
index 8770ee16f..2d6ba75f3 100644
--- a/packages/astro/src/core/dev/restart.ts
+++ b/packages/astro/src/core/dev/restart.ts
@@ -1,14 +1,14 @@
import nodeFs from 'node:fs';
import { fileURLToPath } from 'node:url';
import * as vite from 'vite';
-import type { AstroInlineConfig, AstroSettings } from '../../@types/astro';
+import type { AstroInlineConfig, AstroSettings } from '../../@types/astro.js';
import { eventCliSession, telemetry } from '../../events/index.js';
import { createNodeLogger, createSettings, resolveConfig } from '../config/index.js';
import { collectErrorMetadata } from '../errors/dev/utils.js';
import { isAstroConfigZodError } from '../errors/errors.js';
import { createSafeError } from '../errors/index.js';
import { formatErrorMessage } from '../messages.js';
-import type { Container } from './container';
+import type { Container } from './container.js';
import { createContainer, startContainer } from './container.js';
async function createRestartedContainer(
diff --git a/packages/astro/src/core/endpoint/dev/index.ts b/packages/astro/src/core/endpoint/dev/index.ts
index 79e5c1fd5..96fe5f3d7 100644
--- a/packages/astro/src/core/endpoint/dev/index.ts
+++ b/packages/astro/src/core/endpoint/dev/index.ts
@@ -1,4 +1,4 @@
-import type { EndpointHandler } from '../../../@types/astro';
+import type { EndpointHandler } from '../../../@types/astro.js';
import { createRenderContext, type SSROptions } from '../../render/index.js';
import { callEndpoint } from '../index.js';
diff --git a/packages/astro/src/core/endpoint/index.ts b/packages/astro/src/core/endpoint/index.ts
index a3aff6dca..380e9e345 100644
--- a/packages/astro/src/core/endpoint/index.ts
+++ b/packages/astro/src/core/endpoint/index.ts
@@ -6,13 +6,13 @@ import type {
MiddlewareEndpointHandler,
MiddlewareHandler,
Params,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { renderEndpoint } from '../../runtime/server/index.js';
import { ASTRO_VERSION } from '../constants.js';
import { AstroCookies, attachCookiesToResponse } from '../cookies/index.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import { callMiddleware } from '../middleware/callMiddleware.js';
-import type { Environment, RenderContext } from '../render/index';
+import type { Environment, RenderContext } from '../render/index.js';
const encoder = new TextEncoder();
diff --git a/packages/astro/src/core/errors/index.ts b/packages/astro/src/core/errors/index.ts
index 0f0096eb4..31071cac3 100644
--- a/packages/astro/src/core/errors/index.ts
+++ b/packages/astro/src/core/errors/index.ts
@@ -1,4 +1,3 @@
-export type { ErrorLocation, ErrorWithMetadata } from './errors';
export * as AstroErrorData from './errors-data.js';
export {
AggregateError,
@@ -9,5 +8,6 @@ export {
MarkdownError,
isAstroError,
} from './errors.js';
+export type { ErrorLocation, ErrorWithMetadata } from './errors.js';
export { codeFrame } from './printer.js';
export { createSafeError, positionAt } from './utils.js';
diff --git a/packages/astro/src/core/errors/overlay.ts b/packages/astro/src/core/errors/overlay.ts
index 1ee6fc9d2..7ce891348 100644
--- a/packages/astro/src/core/errors/overlay.ts
+++ b/packages/astro/src/core/errors/overlay.ts
@@ -1,4 +1,4 @@
-import type { AstroErrorPayload } from './dev/vite';
+import type { AstroErrorPayload } from './dev/vite.js';
const style = /* css */ `
* {
diff --git a/packages/astro/src/core/middleware/callMiddleware.ts b/packages/astro/src/core/middleware/callMiddleware.ts
index b83fa4322..1725fd38d 100644
--- a/packages/astro/src/core/middleware/callMiddleware.ts
+++ b/packages/astro/src/core/middleware/callMiddleware.ts
@@ -4,9 +4,9 @@ import type {
EndpointOutput,
MiddlewareHandler,
MiddlewareNext,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
-import type { Environment } from '../render';
+import type { Environment } from '../render/index.js';
/**
* Utility function that is in charge of calling the middleware.
diff --git a/packages/astro/src/core/middleware/index.ts b/packages/astro/src/core/middleware/index.ts
index 90c5bdb5e..1b87bf1e1 100644
--- a/packages/astro/src/core/middleware/index.ts
+++ b/packages/astro/src/core/middleware/index.ts
@@ -1,4 +1,4 @@
-import type { MiddlewareResponseHandler, Params } from '../../@types/astro';
+import type { MiddlewareResponseHandler, Params } from '../../@types/astro.js';
import { createAPIContext } from '../endpoint/index.js';
import { sequence } from './sequence.js';
diff --git a/packages/astro/src/core/middleware/loadMiddleware.ts b/packages/astro/src/core/middleware/loadMiddleware.ts
index 5c64565af..9a7f3e4bc 100644
--- a/packages/astro/src/core/middleware/loadMiddleware.ts
+++ b/packages/astro/src/core/middleware/loadMiddleware.ts
@@ -1,6 +1,6 @@
-import type { AstroSettings } from '../../@types/astro';
+import type { AstroSettings } from '../../@types/astro.js';
import { MIDDLEWARE_PATH_SEGMENT_NAME } from '../constants.js';
-import type { ModuleLoader } from '../module-loader';
+import type { ModuleLoader } from '../module-loader/index.js';
/**
* It accepts a module loader and the astro settings, and it attempts to load the middlewares defined in the configuration.
diff --git a/packages/astro/src/core/middleware/sequence.ts b/packages/astro/src/core/middleware/sequence.ts
index 0358f3719..29b1d1623 100644
--- a/packages/astro/src/core/middleware/sequence.ts
+++ b/packages/astro/src/core/middleware/sequence.ts
@@ -1,4 +1,4 @@
-import type { APIContext, MiddlewareResponseHandler } from '../../@types/astro';
+import type { APIContext, MiddlewareResponseHandler } from '../../@types/astro.js';
import { defineMiddleware } from './index.js';
// From SvelteKit: https://github.com/sveltejs/kit/blob/master/packages/kit/src/exports/hooks/sequence.js
diff --git a/packages/astro/src/core/module-loader/loader.ts b/packages/astro/src/core/module-loader/loader.ts
index c686cef03..4d9872717 100644
--- a/packages/astro/src/core/module-loader/loader.ts
+++ b/packages/astro/src/core/module-loader/loader.ts
@@ -1,6 +1,6 @@
import { EventEmitter } from 'node:events';
import type * as fs from 'node:fs';
-import type { TypedEventEmitter } from '../../@types/typed-emitter';
+import type { TypedEventEmitter } from '../../@types/typed-emitter.js';
// This is a generic interface for a module loader. In the astro cli this is
// fulfilled by Vite, see vite.ts
diff --git a/packages/astro/src/core/module-loader/vite.ts b/packages/astro/src/core/module-loader/vite.ts
index 88ad03cf7..f58b2e720 100644
--- a/packages/astro/src/core/module-loader/vite.ts
+++ b/packages/astro/src/core/module-loader/vite.ts
@@ -1,6 +1,6 @@
import { EventEmitter } from 'node:events';
import type * as vite from 'vite';
-import type { ModuleLoader, ModuleLoaderEventEmitter } from './loader';
+import type { ModuleLoader, ModuleLoaderEventEmitter } from './loader.js';
export function createViteLoader(viteServer: vite.ViteDevServer): ModuleLoader {
const events = new EventEmitter() as ModuleLoaderEventEmitter;
diff --git a/packages/astro/src/core/pipeline.ts b/packages/astro/src/core/pipeline.ts
index 0042c288c..438ff275d 100644
--- a/packages/astro/src/core/pipeline.ts
+++ b/packages/astro/src/core/pipeline.ts
@@ -4,7 +4,7 @@ import type {
MiddlewareEndpointHandler,
MiddlewareHandler,
MiddlewareResponseHandler,
-} from '../@types/astro';
+} from '../@types/astro.js';
import { callEndpoint, createAPIContext } from './endpoint/index.js';
import { callMiddleware } from './middleware/callMiddleware.js';
import { renderPage } from './render/core.js';
diff --git a/packages/astro/src/core/preview/index.ts b/packages/astro/src/core/preview/index.ts
index 7ba0cb2ea..d754baed1 100644
--- a/packages/astro/src/core/preview/index.ts
+++ b/packages/astro/src/core/preview/index.ts
@@ -1,6 +1,6 @@
import { createRequire } from 'node:module';
import { fileURLToPath, pathToFileURL } from 'node:url';
-import type { AstroInlineConfig, PreviewModule, PreviewServer } from '../../@types/astro';
+import type { AstroInlineConfig, PreviewModule, PreviewServer } from '../../@types/astro.js';
import { AstroIntegrationLogger } from '../../core/logger/core.js';
import { telemetry } from '../../events/index.js';
import { eventCliSession } from '../../events/session.js';
diff --git a/packages/astro/src/core/preview/static-preview-server.ts b/packages/astro/src/core/preview/static-preview-server.ts
index b1c882714..3cb0e89e8 100644
--- a/packages/astro/src/core/preview/static-preview-server.ts
+++ b/packages/astro/src/core/preview/static-preview-server.ts
@@ -3,8 +3,8 @@ import { fileURLToPath } from 'node:url';
import { performance } from 'perf_hooks';
import enableDestroy from 'server-destroy';
import { preview, type PreviewServer as VitePreviewServer } from 'vite';
-import type { AstroSettings } from '../../@types/astro';
-import type { Logger } from '../logger/core';
+import type { AstroSettings } from '../../@types/astro.js';
+import type { Logger } from '../logger/core.js';
import * as msg from '../messages.js';
import { getResolvedHostForHttpServer } from './util.js';
import { vitePluginAstroPreview } from './vite-plugin-astro-preview.js';
diff --git a/packages/astro/src/core/redirects/component.ts b/packages/astro/src/core/redirects/component.ts
index ae4dbb4fe..00b8d176c 100644
--- a/packages/astro/src/core/redirects/component.ts
+++ b/packages/astro/src/core/redirects/component.ts
@@ -1,5 +1,5 @@
-import type { ComponentInstance } from '../../@types/astro';
-import type { SinglePageBuiltModule } from '../build/types';
+import type { ComponentInstance } from '../../@types/astro.js';
+import type { SinglePageBuiltModule } from '../build/types.js';
// A stub of a component instance for a given route
export const RedirectComponentInstance: ComponentInstance = {
diff --git a/packages/astro/src/core/redirects/helpers.ts b/packages/astro/src/core/redirects/helpers.ts
index a8d5f9938..7574f2714 100644
--- a/packages/astro/src/core/redirects/helpers.ts
+++ b/packages/astro/src/core/redirects/helpers.ts
@@ -1,4 +1,9 @@
-import type { Params, RedirectRouteData, RouteData, ValidRedirectStatus } from '../../@types/astro';
+import type {
+ Params,
+ RedirectRouteData,
+ RouteData,
+ ValidRedirectStatus,
+} from '../../@types/astro.js';
export function routeIsRedirect(route: RouteData | undefined): route is RedirectRouteData {
return route?.type === 'redirect';
diff --git a/packages/astro/src/core/render/context.ts b/packages/astro/src/core/render/context.ts
index d6806d682..86efb63e3 100644
--- a/packages/astro/src/core/render/context.ts
+++ b/packages/astro/src/core/render/context.ts
@@ -5,9 +5,9 @@ import type {
RouteData,
SSRElement,
SSRResult,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
-import type { Environment } from './environment';
+import type { Environment } from './environment.js';
import { getParamsAndProps } from './params-and-props.js';
const clientLocalsSymbol = Symbol.for('astro.locals');
diff --git a/packages/astro/src/core/render/core.ts b/packages/astro/src/core/render/core.ts
index 3efbddb99..d8c39ec1a 100644
--- a/packages/astro/src/core/render/core.ts
+++ b/packages/astro/src/core/render/core.ts
@@ -4,7 +4,7 @@ import type {
EndpointHandler,
MiddlewareHandler,
MiddlewareResponseHandler,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { renderPage as runtimeRenderPage } from '../../runtime/server/index.js';
import { attachCookiesToResponse } from '../cookies/index.js';
import { callEndpoint, createAPIContext } from '../endpoint/index.js';
diff --git a/packages/astro/src/core/render/environment.ts b/packages/astro/src/core/render/environment.ts
index a41a0b09e..582ee6129 100644
--- a/packages/astro/src/core/render/environment.ts
+++ b/packages/astro/src/core/render/environment.ts
@@ -1,4 +1,4 @@
-import type { RuntimeMode, SSRLoadedRenderer } from '../../@types/astro';
+import type { RuntimeMode, SSRLoadedRenderer } from '../../@types/astro.js';
import type { Logger } from '../logger/core.js';
import type { RouteCache } from './route-cache.js';
diff --git a/packages/astro/src/core/render/index.ts b/packages/astro/src/core/render/index.ts
index 67c82b5c8..098b7d024 100644
--- a/packages/astro/src/core/render/index.ts
+++ b/packages/astro/src/core/render/index.ts
@@ -1,5 +1,5 @@
-import type { AstroMiddlewareInstance, ComponentInstance, RouteData } from '../../@types/astro';
-import type { Environment } from './environment';
+import type { AstroMiddlewareInstance, ComponentInstance, RouteData } from '../../@types/astro.js';
+import type { Environment } from './environment.js';
export { createRenderContext } from './context.js';
export type { RenderContext } from './context.js';
export { tryRenderRoute } from './core.js';
diff --git a/packages/astro/src/core/render/paginate.ts b/packages/astro/src/core/render/paginate.ts
index f8cd8709d..a8d6abbd2 100644
--- a/packages/astro/src/core/render/paginate.ts
+++ b/packages/astro/src/core/render/paginate.ts
@@ -5,7 +5,7 @@ import type {
Params,
Props,
RouteData,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
export function generatePaginateFunction(
diff --git a/packages/astro/src/core/render/params-and-props.ts b/packages/astro/src/core/render/params-and-props.ts
index 2cde3379c..6cdb05ed1 100644
--- a/packages/astro/src/core/render/params-and-props.ts
+++ b/packages/astro/src/core/render/params-and-props.ts
@@ -1,4 +1,4 @@
-import type { ComponentInstance, Params, Props, RouteData } from '../../@types/astro';
+import type { ComponentInstance, Params, Props, RouteData } from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import type { Logger } from '../logger/core.js';
import { getParams } from '../routing/params.js';
diff --git a/packages/astro/src/core/render/renderer.ts b/packages/astro/src/core/render/renderer.ts
index e64a27ba5..4b6015bbb 100644
--- a/packages/astro/src/core/render/renderer.ts
+++ b/packages/astro/src/core/render/renderer.ts
@@ -1,4 +1,4 @@
-import type { AstroRenderer, SSRLoadedRenderer } from '../../@types/astro';
+import type { AstroRenderer, SSRLoadedRenderer } from '../../@types/astro.js';
import type { ModuleLoader } from '../module-loader/index.js';
export async function loadRenderer(
diff --git a/packages/astro/src/core/render/result.ts b/packages/astro/src/core/render/result.ts
index 4d6e4cca5..abfcb5e3e 100644
--- a/packages/astro/src/core/render/result.ts
+++ b/packages/astro/src/core/render/result.ts
@@ -5,7 +5,7 @@ import type {
SSRElement,
SSRLoadedRenderer,
SSRResult,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { renderSlotToString, type ComponentSlots } from '../../runtime/server/index.js';
import { renderJSX } from '../../runtime/server/jsx.js';
import { chunkToString } from '../../runtime/server/render/index.js';
diff --git a/packages/astro/src/core/render/route-cache.ts b/packages/astro/src/core/render/route-cache.ts
index d43ce514b..4bfb94e93 100644
--- a/packages/astro/src/core/render/route-cache.ts
+++ b/packages/astro/src/core/render/route-cache.ts
@@ -7,7 +7,7 @@ import type {
Params,
RouteData,
RuntimeMode,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
import type { Logger } from '../logger/core.js';
diff --git a/packages/astro/src/core/render/ssr-element.ts b/packages/astro/src/core/render/ssr-element.ts
index f282d349a..8593dc0bf 100644
--- a/packages/astro/src/core/render/ssr-element.ts
+++ b/packages/astro/src/core/render/ssr-element.ts
@@ -1,6 +1,6 @@
-import type { SSRElement } from '../../@types/astro';
+import type { SSRElement } from '../../@types/astro.js';
import { joinPaths, prependForwardSlash, slash } from '../../core/path.js';
-import type { StylesheetAsset } from '../app/types';
+import type { StylesheetAsset } from '../app/types.js';
export function createAssetLink(href: string, base?: string, assetsPrefix?: string): string {
if (assetsPrefix) {
diff --git a/packages/astro/src/core/request.ts b/packages/astro/src/core/request.ts
index 5c671a3fc..f478b0a32 100644
--- a/packages/astro/src/core/request.ts
+++ b/packages/astro/src/core/request.ts
@@ -1,5 +1,5 @@
import type { IncomingHttpHeaders } from 'node:http';
-import type { Logger } from './logger/core';
+import type { Logger } from './logger/core.js';
type HeaderType = Headers | Record<string, any> | IncomingHttpHeaders;
type RequestBody = ArrayBuffer | Blob | ReadableStream | URLSearchParams | FormData;
diff --git a/packages/astro/src/core/routing/manifest/create.ts b/packages/astro/src/core/routing/manifest/create.ts
index f08c2a585..8fd3a8d82 100644
--- a/packages/astro/src/core/routing/manifest/create.ts
+++ b/packages/astro/src/core/routing/manifest/create.ts
@@ -5,8 +5,8 @@ import type {
ManifestData,
RouteData,
RoutePart,
-} from '../../../@types/astro';
-import type { Logger } from '../../logger/core';
+} from '../../../@types/astro.js';
+import type { Logger } from '../../logger/core.js';
import { createRequire } from 'module';
import nodeFs from 'node:fs';
diff --git a/packages/astro/src/core/routing/manifest/generator.ts b/packages/astro/src/core/routing/manifest/generator.ts
index 4945ea9f1..60614f2e5 100644
--- a/packages/astro/src/core/routing/manifest/generator.ts
+++ b/packages/astro/src/core/routing/manifest/generator.ts
@@ -1,4 +1,4 @@
-import type { AstroConfig, RoutePart } from '../../../@types/astro';
+import type { AstroConfig, RoutePart } from '../../../@types/astro.js';
import { compile } from 'path-to-regexp';
diff --git a/packages/astro/src/core/routing/manifest/serialization.ts b/packages/astro/src/core/routing/manifest/serialization.ts
index 4ed067db5..71ffc221d 100644
--- a/packages/astro/src/core/routing/manifest/serialization.ts
+++ b/packages/astro/src/core/routing/manifest/serialization.ts
@@ -1,4 +1,4 @@
-import type { AstroConfig, RouteData, SerializedRouteData } from '../../../@types/astro';
+import type { AstroConfig, RouteData, SerializedRouteData } from '../../../@types/astro.js';
import { getRouteGenerator } from './generator.js';
diff --git a/packages/astro/src/core/routing/match.ts b/packages/astro/src/core/routing/match.ts
index 84b65fd6f..9b91e1e9a 100644
--- a/packages/astro/src/core/routing/match.ts
+++ b/packages/astro/src/core/routing/match.ts
@@ -1,4 +1,4 @@
-import type { ManifestData, RouteData } from '../../@types/astro';
+import type { ManifestData, RouteData } from '../../@types/astro.js';
/** Find matching route from pathname */
export function matchRoute(pathname: string, manifest: ManifestData): RouteData | undefined {
diff --git a/packages/astro/src/core/routing/params.ts b/packages/astro/src/core/routing/params.ts
index 1e6b16858..987528d57 100644
--- a/packages/astro/src/core/routing/params.ts
+++ b/packages/astro/src/core/routing/params.ts
@@ -1,4 +1,4 @@
-import type { GetStaticPathsItem, Params, RouteData } from '../../@types/astro';
+import type { GetStaticPathsItem, Params, RouteData } from '../../@types/astro.js';
import { trimSlashes } from '../path.js';
import { validateGetStaticPathsParameter } from './validation.js';
diff --git a/packages/astro/src/core/routing/validation.ts b/packages/astro/src/core/routing/validation.ts
index e9f03eef8..0261c865a 100644
--- a/packages/astro/src/core/routing/validation.ts
+++ b/packages/astro/src/core/routing/validation.ts
@@ -1,6 +1,6 @@
-import type { ComponentInstance, GetStaticPathsResult, RouteData } from '../../@types/astro';
+import type { ComponentInstance, GetStaticPathsResult, RouteData } from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../errors/index.js';
-import type { Logger } from '../logger/core';
+import type { Logger } from '../logger/core.js';
const VALID_PARAM_TYPES = ['string', 'number', 'undefined'];
diff --git a/packages/astro/src/core/sync/index.ts b/packages/astro/src/core/sync/index.ts
index 3dea7c714..940ff0524 100644
--- a/packages/astro/src/core/sync/index.ts
+++ b/packages/astro/src/core/sync/index.ts
@@ -3,7 +3,7 @@ import fsMod from 'node:fs';
import { performance } from 'node:perf_hooks';
import { fileURLToPath } from 'node:url';
import { createServer, type HMRPayload } from 'vite';
-import type { AstroInlineConfig, AstroSettings } from '../../@types/astro';
+import type { AstroInlineConfig, AstroSettings } from '../../@types/astro.js';
import { createContentTypesGenerator } from '../../content/index.js';
import { globalContentConfigObserver } from '../../content/utils.js';
import { telemetry } from '../../events/index.js';
diff --git a/packages/astro/src/core/util.ts b/packages/astro/src/core/util.ts
index d442e5811..bcfa9a511 100644
--- a/packages/astro/src/core/util.ts
+++ b/packages/astro/src/core/util.ts
@@ -2,10 +2,10 @@ import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { normalizePath } from 'vite';
-import type { AstroConfig, AstroSettings, RouteType } from '../@types/astro';
+import type { AstroConfig, AstroSettings, RouteType } from '../@types/astro.js';
import { isServerLikeOutput } from '../prerender/utils.js';
import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './constants.js';
-import type { ModuleLoader } from './module-loader';
+import type { ModuleLoader } from './module-loader/index.js';
import { prependForwardSlash, removeTrailingForwardSlash, slash } from './path.js';
/** Returns true if argument is an object of any prototype/class (but not null). */
diff --git a/packages/astro/src/events/session.ts b/packages/astro/src/events/session.ts
index 706779d4b..b37530342 100644
--- a/packages/astro/src/events/session.ts
+++ b/packages/astro/src/events/session.ts
@@ -1,4 +1,4 @@
-import type { AstroUserConfig } from '../@types/astro';
+import type { AstroUserConfig } from '../@types/astro.js';
const EVENT_SESSION = 'ASTRO_CLI_SESSION_STARTED';
diff --git a/packages/astro/src/integrations/astroFeaturesValidation.ts b/packages/astro/src/integrations/astroFeaturesValidation.ts
index eb388745d..7f40479f3 100644
--- a/packages/astro/src/integrations/astroFeaturesValidation.ts
+++ b/packages/astro/src/integrations/astroFeaturesValidation.ts
@@ -3,7 +3,7 @@ import type {
AstroConfig,
AstroFeatureMap,
SupportsKind,
-} from '../@types/astro';
+} from '../@types/astro.js';
import type { Logger } from '../core/logger/core.js';
const STABLE = 'stable';
diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts
index 774ea5b04..92f277872 100644
--- a/packages/astro/src/integrations/index.ts
+++ b/packages/astro/src/integrations/index.ts
@@ -14,8 +14,8 @@ import type {
HookParameters,
RouteData,
} from '../@types/astro.js';
-import type { SerializedSSRManifest } from '../core/app/types';
-import type { PageBuildData } from '../core/build/types';
+import type { SerializedSSRManifest } from '../core/app/types.js';
+import type { PageBuildData } from '../core/build/types.js';
import { buildClientDirectiveEntrypoint } from '../core/client-directive/index.js';
import { mergeConfig } from '../core/config/index.js';
import { AstroIntegrationLogger, type Logger } from '../core/logger/core.js';
diff --git a/packages/astro/src/jsx/babel.ts b/packages/astro/src/jsx/babel.ts
index 6ae8ebe1c..e8f9da87e 100644
--- a/packages/astro/src/jsx/babel.ts
+++ b/packages/astro/src/jsx/babel.ts
@@ -3,7 +3,7 @@ import * as t from '@babel/types';
import { AstroError } from '../core/errors/errors.js';
import { AstroErrorData } from '../core/errors/index.js';
import { resolvePath } from '../core/util.js';
-import type { PluginMetadata } from '../vite-plugin-astro/types';
+import type { PluginMetadata } from '../vite-plugin-astro/types.js';
const ClientOnlyPlaceholder = 'astro-client-only';
diff --git a/packages/astro/src/prerender/metadata.ts b/packages/astro/src/prerender/metadata.ts
index 15527af37..a501cc46f 100644
--- a/packages/astro/src/prerender/metadata.ts
+++ b/packages/astro/src/prerender/metadata.ts
@@ -1,4 +1,4 @@
-import type { ModuleInfo, ModuleLoader } from '../core/module-loader';
+import type { ModuleInfo, ModuleLoader } from '../core/module-loader/index.js';
import { viteID } from '../core/util.js';
type GetPrerenderStatusParams = {
diff --git a/packages/astro/src/prerender/routing.ts b/packages/astro/src/prerender/routing.ts
index 99ee2886b..1c1b83825 100644
--- a/packages/astro/src/prerender/routing.ts
+++ b/packages/astro/src/prerender/routing.ts
@@ -1,6 +1,6 @@
-import type { AstroSettings, ComponentInstance, RouteData } from '../@types/astro';
+import type { AstroSettings, ComponentInstance, RouteData } from '../@types/astro.js';
import { RedirectComponentInstance, routeIsRedirect } from '../core/redirects/index.js';
-import type DevPipeline from '../vite-plugin-astro-server/devPipeline';
+import type DevPipeline from '../vite-plugin-astro-server/devPipeline.js';
import { preload } from '../vite-plugin-astro-server/index.js';
import { getPrerenderStatus } from './metadata.js';
diff --git a/packages/astro/src/prerender/utils.ts b/packages/astro/src/prerender/utils.ts
index a3655eead..b44435213 100644
--- a/packages/astro/src/prerender/utils.ts
+++ b/packages/astro/src/prerender/utils.ts
@@ -1,4 +1,4 @@
-import type { AstroConfig } from '../@types/astro';
+import type { AstroConfig } from '../@types/astro.js';
import { getOutDirWithinCwd } from '../core/build/common.js';
export function isServerLikeOutput(config: AstroConfig) {
diff --git a/packages/astro/src/runtime/client/idle.ts b/packages/astro/src/runtime/client/idle.ts
index 48aa9dc1f..990d5da6e 100644
--- a/packages/astro/src/runtime/client/idle.ts
+++ b/packages/astro/src/runtime/client/idle.ts
@@ -1,4 +1,4 @@
-import type { ClientDirective } from '../../@types/astro';
+import type { ClientDirective } from '../../@types/astro.js';
const idleDirective: ClientDirective = (load) => {
const cb = async () => {
diff --git a/packages/astro/src/runtime/client/load.ts b/packages/astro/src/runtime/client/load.ts
index 15a2f1dcb..b603eecb3 100644
--- a/packages/astro/src/runtime/client/load.ts
+++ b/packages/astro/src/runtime/client/load.ts
@@ -1,4 +1,4 @@
-import type { ClientDirective } from '../../@types/astro';
+import type { ClientDirective } from '../../@types/astro.js';
const loadDirective: ClientDirective = async (load) => {
const hydrate = await load();
diff --git a/packages/astro/src/runtime/client/media.ts b/packages/astro/src/runtime/client/media.ts
index 3d92d3713..f894af311 100644
--- a/packages/astro/src/runtime/client/media.ts
+++ b/packages/astro/src/runtime/client/media.ts
@@ -1,4 +1,4 @@
-import type { ClientDirective } from '../../@types/astro';
+import type { ClientDirective } from '../../@types/astro.js';
/**
* Hydrate this component when a matching media query is found
diff --git a/packages/astro/src/runtime/client/only.ts b/packages/astro/src/runtime/client/only.ts
index f67ae3ace..8e072b7a3 100644
--- a/packages/astro/src/runtime/client/only.ts
+++ b/packages/astro/src/runtime/client/only.ts
@@ -1,4 +1,4 @@
-import type { ClientDirective } from '../../@types/astro';
+import type { ClientDirective } from '../../@types/astro.js';
/**
* Hydrate this component only on the client
diff --git a/packages/astro/src/runtime/client/visible.ts b/packages/astro/src/runtime/client/visible.ts
index cc4f77771..de36b2909 100644
--- a/packages/astro/src/runtime/client/visible.ts
+++ b/packages/astro/src/runtime/client/visible.ts
@@ -1,4 +1,4 @@
-import type { ClientDirective } from '../../@types/astro';
+import type { ClientDirective } from '../../@types/astro.js';
/**
* Hydrate this component when one of it's children becomes visible
diff --git a/packages/astro/src/runtime/server/astro-component.ts b/packages/astro/src/runtime/server/astro-component.ts
index 57f2d3c3b..9acc099a9 100644
--- a/packages/astro/src/runtime/server/astro-component.ts
+++ b/packages/astro/src/runtime/server/astro-component.ts
@@ -1,4 +1,4 @@
-import type { PropagationHint } from '../../@types/astro';
+import type { PropagationHint } from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../../core/errors/index.js';
import type { AstroComponentFactory } from './render/index.js';
diff --git a/packages/astro/src/runtime/server/astro-global.ts b/packages/astro/src/runtime/server/astro-global.ts
index 82855c669..c15cd8a4a 100644
--- a/packages/astro/src/runtime/server/astro-global.ts
+++ b/packages/astro/src/runtime/server/astro-global.ts
@@ -1,4 +1,4 @@
-import type { AstroGlobalPartial } from '../../@types/astro';
+import type { AstroGlobalPartial } from '../../@types/astro.js';
import { ASTRO_VERSION } from '../../core/constants.js';
import { AstroError, AstroErrorData } from '../../core/errors/index.js';
diff --git a/packages/astro/src/runtime/server/endpoint.ts b/packages/astro/src/runtime/server/endpoint.ts
index 686e3795f..7db5f07ee 100644
--- a/packages/astro/src/runtime/server/endpoint.ts
+++ b/packages/astro/src/runtime/server/endpoint.ts
@@ -1,4 +1,4 @@
-import type { APIContext, EndpointHandler, Params } from '../../@types/astro';
+import type { APIContext, EndpointHandler, Params } from '../../@types/astro.js';
import type { Logger } from '../../core/logger/core.js';
function getHandlerFromModule(mod: EndpointHandler, method: string, logger: Logger) {
diff --git a/packages/astro/src/runtime/server/hydration.ts b/packages/astro/src/runtime/server/hydration.ts
index 81a3cf9e2..e9d99c81a 100644
--- a/packages/astro/src/runtime/server/hydration.ts
+++ b/packages/astro/src/runtime/server/hydration.ts
@@ -3,7 +3,7 @@ import type {
SSRElement,
SSRLoadedRenderer,
SSRResult,
-} from '../../@types/astro';
+} from '../../@types/astro.js';
import { AstroError, AstroErrorData } from '../../core/errors/index.js';
import { escapeHTML } from './escape.js';
import { serializeProps } from './serialize.js';
diff --git a/packages/astro/src/runtime/server/render/astro/factory.ts b/packages/astro/src/runtime/server/render/astro/factory.ts
index 97b8e4574..68d5af739 100644
--- a/packages/astro/src/runtime/server/render/astro/factory.ts
+++ b/packages/astro/src/runtime/server/render/astro/factory.ts
@@ -1,6 +1,6 @@
-import type { PropagationHint, SSRResult } from '../../../../@types/astro';
-import type { HeadAndContent } from './head-and-content';
-import type { RenderTemplateResult } from './render-template';
+import type { PropagationHint, SSRResult } from '../../../../@types/astro.js';
+import type { HeadAndContent } from './head-and-content.js';
+import type { RenderTemplateResult } from './render-template.js';
export type AstroFactoryReturnValue = RenderTemplateResult | Response | HeadAndContent;
diff --git a/packages/astro/src/runtime/server/render/astro/head-and-content.ts b/packages/astro/src/runtime/server/render/astro/head-and-content.ts
index d895d9dd6..eb32c3148 100644
--- a/packages/astro/src/runtime/server/render/astro/head-and-content.ts
+++ b/packages/astro/src/runtime/server/render/astro/head-and-content.ts
@@ -1,4 +1,4 @@
-import type { RenderTemplateResult } from './render-template';
+import type { RenderTemplateResult } from './render-template.js';
const headAndContentSym = Symbol.for('astro.headAndContent');
diff --git a/packages/astro/src/runtime/server/render/astro/index.ts b/packages/astro/src/runtime/server/render/astro/index.ts
index d9283b9f9..9510c0cbb 100644
--- a/packages/astro/src/runtime/server/render/astro/index.ts
+++ b/packages/astro/src/runtime/server/render/astro/index.ts
@@ -1,7 +1,7 @@
-export type { AstroComponentFactory } from './factory';
export { isAstroComponentFactory } from './factory.js';
+export type { AstroComponentFactory } from './factory.js';
export { createHeadAndContent, isHeadAndContent } from './head-and-content.js';
-export type { AstroComponentInstance } from './instance';
export { createAstroComponentInstance, isAstroComponentInstance } from './instance.js';
+export type { AstroComponentInstance } from './instance.js';
export { isRenderTemplateResult, renderTemplate } from './render-template.js';
export { renderToReadableStream, renderToString } from './render.js';
diff --git a/packages/astro/src/runtime/server/render/astro/instance.ts b/packages/astro/src/runtime/server/render/astro/instance.ts
index 7502d30a7..feae0e0e8 100644
--- a/packages/astro/src/runtime/server/render/astro/instance.ts
+++ b/packages/astro/src/runtime/server/render/astro/instance.ts
@@ -1,4 +1,4 @@
-import type { SSRResult } from '../../../../@types/astro';
+import type { SSRResult } from '../../../../@types/astro.js';
import type { ComponentSlots } from '../slot.js';
import type { AstroComponentFactory, AstroFactoryReturnValue } from './factory.js';
diff --git a/packages/astro/src/runtime/server/render/astro/render.ts b/packages/astro/src/runtime/server/render/astro/render.ts
index 0c34ef98d..7091513c7 100644
--- a/packages/astro/src/runtime/server/render/astro/render.ts
+++ b/packages/astro/src/runtime/server/render/astro/render.ts
@@ -1,4 +1,4 @@
-import type { RouteData, SSRResult } from '../../../../@types/astro';
+import type { RouteData, SSRResult } from '../../../../@types/astro.js';
import { AstroError, AstroErrorData } from '../../../../core/errors/index.js';
import { chunkToByteArray, chunkToString, encoder, type RenderDestination } from '../common.js';
import type { AstroComponentFactory } from './factory.js';
diff --git a/packages/astro/src/runtime/server/render/common.ts b/packages/astro/src/runtime/server/render/common.ts
index 7beaed2eb..03e9c8308 100644
--- a/packages/astro/src/runtime/server/render/common.ts
+++ b/packages/astro/src/runtime/server/render/common.ts
@@ -1,4 +1,4 @@
-import type { SSRResult } from '../../../@types/astro';
+import type { SSRResult } from '../../../@types/astro.js';
import type { RenderInstruction } from './instruction.js';
import { HTMLBytes, HTMLString, markHTMLString } from '../escape.js';
diff --git a/packages/astro/src/runtime/server/render/component.ts b/packages/astro/src/runtime/server/render/component.ts
index 1c7701fd2..bfb82ceda 100644
--- a/packages/astro/src/runtime/server/render/component.ts
+++ b/packages/astro/src/runtime/server/render/component.ts
@@ -3,7 +3,7 @@ import type {
RouteData,
SSRLoadedRenderer,
SSRResult,
-} from '../../../@types/astro';
+} from '../../../@types/astro.js';
import { createRenderInstruction, type RenderInstruction } from './instruction.js';
import { clsx } from 'clsx';
diff --git a/packages/astro/src/runtime/server/render/dom.ts b/packages/astro/src/runtime/server/render/dom.ts
index 1d0ea192f..ca2017018 100644
--- a/packages/astro/src/runtime/server/render/dom.ts
+++ b/packages/astro/src/runtime/server/render/dom.ts
@@ -1,4 +1,4 @@
-import type { SSRResult } from '../../../@types/astro';
+import type { SSRResult } from '../../../@types/astro.js';
import { markHTMLString } from '../escape.js';
import { renderSlotToString } from './slot.js';
diff --git a/packages/astro/src/runtime/server/render/head.ts b/packages/astro/src/runtime/server/render/head.ts
index d2cb43fa3..bad8140ec 100644
--- a/packages/astro/src/runtime/server/render/head.ts
+++ b/packages/astro/src/runtime/server/render/head.ts
@@ -1,4 +1,4 @@
-import type { SSRResult } from '../../../@types/astro';
+import type { SSRResult } from '../../../@types/astro.js';
import { markHTMLString } from '../escape.js';
import type { MaybeRenderHeadInstruction, RenderHeadInstruction } from './instruction.js';
diff --git a/packages/astro/src/runtime/server/render/index.ts b/packages/astro/src/runtime/server/render/index.ts
index da83879e0..55dba8fa8 100644
--- a/packages/astro/src/runtime/server/render/index.ts
+++ b/packages/astro/src/runtime/server/render/index.ts
@@ -1,10 +1,10 @@
-export type { AstroComponentFactory, AstroComponentInstance } from './astro/index';
export { createHeadAndContent, renderTemplate, renderToString } from './astro/index.js';
+export type { AstroComponentFactory, AstroComponentInstance } from './astro/index.js';
export { Fragment, Renderer, chunkToByteArray, chunkToString } from './common.js';
export { renderComponent, renderComponentToString } from './component.js';
export { renderHTMLElement } from './dom.js';
export { maybeRenderHead, renderHead } from './head.js';
-export type { RenderInstruction } from './instruction';
+export type { RenderInstruction } from './instruction.js';
export { renderPage } from './page.js';
export { renderSlot, renderSlotToString, type ComponentSlots } from './slot.js';
export { renderScriptElement, renderUniqueStylesheet } from './tags.js';
diff --git a/packages/astro/src/runtime/server/render/page.ts b/packages/astro/src/runtime/server/render/page.ts
index 74e8a45b7..2f4e87f5f 100644
--- a/packages/astro/src/runtime/server/render/page.ts
+++ b/packages/astro/src/runtime/server/render/page.ts
@@ -1,6 +1,6 @@
-import type { RouteData, SSRResult } from '../../../@types/astro';
+import type { RouteData, SSRResult } from '../../../@types/astro.js';
import { renderComponentToString, type NonAstroPageComponent } from './component.js';
-import type { AstroComponentFactory } from './index';
+import type { AstroComponentFactory } from './index.js';
import { isAstroComponentFactory } from './astro/index.js';
import { renderToReadableStream, renderToString } from './astro/render.js';
diff --git a/packages/astro/src/runtime/server/render/tags.ts b/packages/astro/src/runtime/server/render/tags.ts
index 684480f9f..093c51a3c 100644
--- a/packages/astro/src/runtime/server/render/tags.ts
+++ b/packages/astro/src/runtime/server/render/tags.ts
@@ -1,5 +1,5 @@
-import type { SSRElement, SSRResult } from '../../../@types/astro';
-import type { StylesheetAsset } from '../../../core/app/types';
+import type { SSRElement, SSRResult } from '../../../@types/astro.js';
+import type { StylesheetAsset } from '../../../core/app/types.js';
import { renderElement } from './util.js';
export function renderScriptElement({ props, children }: SSRElement) {
diff --git a/packages/astro/src/runtime/server/render/util.ts b/packages/astro/src/runtime/server/render/util.ts
index 5e99eb008..fca449fcf 100644
--- a/packages/astro/src/runtime/server/render/util.ts
+++ b/packages/astro/src/runtime/server/render/util.ts
@@ -1,4 +1,4 @@
-import type { SSRElement } from '../../../@types/astro';
+import type { SSRElement } from '../../../@types/astro.js';
import type { RenderDestination, RenderDestinationChunk, RenderFunction } from './common.js';
import { clsx } from 'clsx';
diff --git a/packages/astro/src/runtime/server/scripts.ts b/packages/astro/src/runtime/server/scripts.ts
index a56f6686a..47cd122f1 100644
--- a/packages/astro/src/runtime/server/scripts.ts
+++ b/packages/astro/src/runtime/server/scripts.ts
@@ -1,4 +1,4 @@
-import type { SSRResult } from '../../@types/astro';
+import type { SSRResult } from '../../@types/astro.js';
import islandScript from './astro-island.prebuilt.js';
const ISLAND_STYLES = `<style>astro-island,astro-slot,astro-static-slot{display:contents}</style>`;
diff --git a/packages/astro/src/runtime/server/serialize.ts b/packages/astro/src/runtime/server/serialize.ts
index b52c9e215..0d754ebc8 100644
--- a/packages/astro/src/runtime/server/serialize.ts
+++ b/packages/astro/src/runtime/server/serialize.ts
@@ -1,5 +1,5 @@
-import type { AstroComponentMetadata } from '../../@types/astro';
-import type { ValueOf } from '../../type-utils';
+import type { AstroComponentMetadata } from '../../@types/astro.js';
+import type { ValueOf } from '../../type-utils.js';
const PROP_TYPE = {
Value: 0,
diff --git a/packages/astro/src/runtime/server/transition.ts b/packages/astro/src/runtime/server/transition.ts
index 4a13c8126..17eece1d9 100644
--- a/packages/astro/src/runtime/server/transition.ts
+++ b/packages/astro/src/runtime/server/transition.ts
@@ -1,4 +1,8 @@
-import type { SSRResult, TransitionAnimation, TransitionAnimationValue } from '../../@types/astro';
+import type {
+ SSRResult,
+ TransitionAnimation,
+ TransitionAnimationValue,
+} from '../../@types/astro.js';
import { fade, slide } from '../../transitions/index.js';
import { markHTMLString } from './escape.js';
diff --git a/packages/astro/src/transitions/index.ts b/packages/astro/src/transitions/index.ts
index 7d4711a32..0a58d2d4b 100644
--- a/packages/astro/src/transitions/index.ts
+++ b/packages/astro/src/transitions/index.ts
@@ -1,4 +1,4 @@
-import type { TransitionAnimationPair, TransitionDirectionalAnimations } from '../@types/astro';
+import type { TransitionAnimationPair, TransitionDirectionalAnimations } from '../@types/astro.js';
const EASE_IN_OUT_QUART = 'cubic-bezier(0.76, 0, 0.24, 1)';
diff --git a/packages/astro/src/vite-plugin-astro-server/base.ts b/packages/astro/src/vite-plugin-astro-server/base.ts
index bb6a8a009..7bf57d10a 100644
--- a/packages/astro/src/vite-plugin-astro-server/base.ts
+++ b/packages/astro/src/vite-plugin-astro-server/base.ts
@@ -1,5 +1,5 @@
import type * as vite from 'vite';
-import type { AstroSettings } from '../@types/astro';
+import type { AstroSettings } from '../@types/astro.js';
import * as fs from 'node:fs';
import type { Logger } from '../core/logger/core.js';
diff --git a/packages/astro/src/vite-plugin-astro-server/controller.ts b/packages/astro/src/vite-plugin-astro-server/controller.ts
index 3004e68f3..279863613 100644
--- a/packages/astro/src/vite-plugin-astro-server/controller.ts
+++ b/packages/astro/src/vite-plugin-astro-server/controller.ts
@@ -1,5 +1,5 @@
-import type { LoaderEvents, ModuleLoader } from '../core/module-loader/index';
-import type { ServerState } from './server-state';
+import type { LoaderEvents, ModuleLoader } from '../core/module-loader/index.js';
+import type { ServerState } from './server-state.js';
import {
clearRouteError,
diff --git a/packages/astro/src/vite-plugin-astro-server/css.ts b/packages/astro/src/vite-plugin-astro-server/css.ts
index 093bda461..46f1235bb 100644
--- a/packages/astro/src/vite-plugin-astro-server/css.ts
+++ b/packages/astro/src/vite-plugin-astro-server/css.ts
@@ -1,5 +1,5 @@
import type { RuntimeMode } from '../@types/astro.js';
-import type { ModuleLoader } from '../core/module-loader';
+import type { ModuleLoader } from '../core/module-loader/index.js';
import { viteID } from '../core/util.js';
import { isBuildableCSSRequest } from './util.js';
import { crawlGraph } from './vite.js';
diff --git a/packages/astro/src/vite-plugin-astro-server/devPipeline.ts b/packages/astro/src/vite-plugin-astro-server/devPipeline.ts
index fbe9c0429..e16b3d7e2 100644
--- a/packages/astro/src/vite-plugin-astro-server/devPipeline.ts
+++ b/packages/astro/src/vite-plugin-astro-server/devPipeline.ts
@@ -4,11 +4,11 @@ import type {
RuntimeMode,
SSRLoadedRenderer,
SSRManifest,
-} from '../@types/astro';
-import type { Logger } from '../core/logger/core';
-import type { ModuleLoader } from '../core/module-loader';
+} from '../@types/astro.js';
+import type { Logger } from '../core/logger/core.js';
+import type { ModuleLoader } from '../core/module-loader/index.js';
import { Pipeline } from '../core/pipeline.js';
-import type { Environment } from '../core/render';
+import type { Environment } from '../core/render/index.js';
import { createEnvironment, loadRenderer } from '../core/render/index.js';
import { RouteCache } from '../core/render/route-cache.js';
import { isServerLikeOutput } from '../prerender/utils.js';
diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts
index b02c57e1c..97592d47a 100644
--- a/packages/astro/src/vite-plugin-astro-server/index.ts
+++ b/packages/astro/src/vite-plugin-astro-server/index.ts
@@ -2,7 +2,7 @@ import type { ComponentInstance } from '../@types/astro.js';
import { enhanceViteSSRError } from '../core/errors/dev/index.js';
import { AggregateError, CSSError, MarkdownError } from '../core/errors/index.js';
import { viteID } from '../core/util.js';
-import type DevPipeline from './devPipeline';
+import type DevPipeline from './devPipeline.js';
export async function preload({
pipeline,
diff --git a/packages/astro/src/vite-plugin-astro-server/metadata.ts b/packages/astro/src/vite-plugin-astro-server/metadata.ts
index 81e972dba..09e2373cf 100644
--- a/packages/astro/src/vite-plugin-astro-server/metadata.ts
+++ b/packages/astro/src/vite-plugin-astro-server/metadata.ts
@@ -1,5 +1,5 @@
-import type { SSRComponentMetadata, SSRResult } from '../@types/astro';
-import type { ModuleInfo, ModuleLoader } from '../core/module-loader';
+import type { SSRComponentMetadata, SSRResult } from '../@types/astro.js';
+import type { ModuleInfo, ModuleLoader } from '../core/module-loader/index.js';
import { viteID } from '../core/util.js';
import { getAstroMetadata } from '../vite-plugin-astro/index.js';
import { crawlGraph } from './vite.js';
diff --git a/packages/astro/src/vite-plugin-astro-server/plugin.ts b/packages/astro/src/vite-plugin-astro-server/plugin.ts
index 80da6d787..daa1c01e6 100644
--- a/packages/astro/src/vite-plugin-astro-server/plugin.ts
+++ b/packages/astro/src/vite-plugin-astro-server/plugin.ts
@@ -1,6 +1,6 @@
import type fs from 'node:fs';
import type * as vite from 'vite';
-import type { AstroSettings, ManifestData, SSRManifest } from '../@types/astro';
+import type { AstroSettings, ManifestData, SSRManifest } from '../@types/astro.js';
import { patchOverlay } from '../core/errors/overlay.js';
import type { Logger } from '../core/logger/core.js';
import { createViteLoader } from '../core/module-loader/index.js';
diff --git a/packages/astro/src/vite-plugin-astro-server/request.ts b/packages/astro/src/vite-plugin-astro-server/request.ts
index cea9349e0..65e97b96f 100644
--- a/packages/astro/src/vite-plugin-astro-server/request.ts
+++ b/packages/astro/src/vite-plugin-astro-server/request.ts
@@ -1,14 +1,14 @@
import type http from 'node:http';
-import type { ManifestData, SSRManifest } from '../@types/astro';
+import type { ManifestData, SSRManifest } from '../@types/astro.js';
import { collectErrorMetadata } from '../core/errors/dev/index.js';
import { createSafeError } from '../core/errors/index.js';
import * as msg from '../core/messages.js';
import { collapseDuplicateSlashes, removeTrailingForwardSlash } from '../core/path.js';
import { eventError, telemetry } from '../events/index.js';
import { isServerLikeOutput } from '../prerender/utils.js';
-import type { DevServerController } from './controller';
+import type { DevServerController } from './controller.js';
import { runWithErrorHandling } from './controller.js';
-import type DevPipeline from './devPipeline';
+import type DevPipeline from './devPipeline.js';
import { handle500Response } from './response.js';
import { handleRoute, matchRoute } from './route.js';
diff --git a/packages/astro/src/vite-plugin-astro-server/resolve.ts b/packages/astro/src/vite-plugin-astro-server/resolve.ts
index f67d83576..cbeda56b0 100644
--- a/packages/astro/src/vite-plugin-astro-server/resolve.ts
+++ b/packages/astro/src/vite-plugin-astro-server/resolve.ts
@@ -1,4 +1,4 @@
-import type { ModuleLoader } from '../core/module-loader';
+import type { ModuleLoader } from '../core/module-loader/index.js';
import { resolveIdToUrl } from '../core/util.js';
export function createResolve(loader: ModuleLoader, root: URL) {
diff --git a/packages/astro/src/vite-plugin-astro-server/response.ts b/packages/astro/src/vite-plugin-astro-server/response.ts
index 9e74a754f..b1c948095 100644
--- a/packages/astro/src/vite-plugin-astro-server/response.ts
+++ b/packages/astro/src/vite-plugin-astro-server/response.ts
@@ -1,6 +1,6 @@
import type http from 'node:http';
import type { ErrorWithMetadata } from '../core/errors/index.js';
-import type { ModuleLoader } from '../core/module-loader/index';
+import type { ModuleLoader } from '../core/module-loader/index.js';
import { Readable } from 'stream';
import { getSetCookiesFromResponse } from '../core/cookies/index.js';
diff --git a/packages/astro/src/vite-plugin-astro-server/route.ts b/packages/astro/src/vite-plugin-astro-server/route.ts
index 120fc7722..da2c4b948 100644
--- a/packages/astro/src/vite-plugin-astro-server/route.ts
+++ b/packages/astro/src/vite-plugin-astro-server/route.ts
@@ -6,7 +6,7 @@ import type {
RouteData,
SSRElement,
SSRManifest,
-} from '../@types/astro';
+} from '../@types/astro.js';
import { AstroErrorData, isAstroError } from '../core/errors/index.js';
import { loadMiddleware } from '../core/middleware/loadMiddleware.js';
import { createRenderContext, getParamsAndProps, type SSROptions } from '../core/render/index.js';
diff --git a/packages/astro/src/vite-plugin-astro-server/scripts.ts b/packages/astro/src/vite-plugin-astro-server/scripts.ts
index 55fe20254..00bc4054b 100644
--- a/packages/astro/src/vite-plugin-astro-server/scripts.ts
+++ b/packages/astro/src/vite-plugin-astro-server/scripts.ts
@@ -1,8 +1,8 @@
-import type { SSRElement } from '../@types/astro';
-import type { ModuleInfo, ModuleLoader } from '../core/module-loader';
+import type { SSRElement } from '../@types/astro.js';
+import type { ModuleInfo, ModuleLoader } from '../core/module-loader/index.js';
import { createModuleScriptElementWithSrc } from '../core/render/ssr-element.js';
import { rootRelativePath, viteID } from '../core/util.js';
-import type { PluginMetadata as AstroPluginMetadata } from '../vite-plugin-astro/types';
+import type { PluginMetadata as AstroPluginMetadata } from '../vite-plugin-astro/types.js';
import { crawlGraph } from './vite.js';
export async function getScriptsForURL(
diff --git a/packages/astro/src/vite-plugin-astro-server/vite.ts b/packages/astro/src/vite-plugin-astro-server/vite.ts
index ef6ffd308..6c2bc2497 100644
--- a/packages/astro/src/vite-plugin-astro-server/vite.ts
+++ b/packages/astro/src/vite-plugin-astro-server/vite.ts
@@ -1,6 +1,6 @@
import npath from 'node:path';
import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from '../core/constants.js';
-import type { ModuleLoader, ModuleNode } from '../core/module-loader/index';
+import type { ModuleLoader, ModuleNode } from '../core/module-loader/index.js';
import { unwrapId } from '../core/util.js';
import { isCSSRequest } from './util.js';
diff --git a/packages/astro/src/vite-plugin-astro/compile.ts b/packages/astro/src/vite-plugin-astro/compile.ts
index 6c6b797ec..768d18d86 100644
--- a/packages/astro/src/vite-plugin-astro/compile.ts
+++ b/packages/astro/src/vite-plugin-astro/compile.ts
@@ -1,5 +1,5 @@
import { transformWithEsbuild, type ESBuildTransformResult } from 'vite';
-import type { AstroConfig } from '../@types/astro';
+import type { AstroConfig } from '../@types/astro.js';
import { cachedCompilation, type CompileProps, type CompileResult } from '../core/compile/index.js';
import type { Logger } from '../core/logger/core.js';
import { getFileInfo } from '../vite-plugin-utils/index.js';
diff --git a/packages/astro/src/vite-plugin-astro/hmr.ts b/packages/astro/src/vite-plugin-astro/hmr.ts
index 6502ae513..65186af5e 100644
--- a/packages/astro/src/vite-plugin-astro/hmr.ts
+++ b/packages/astro/src/vite-plugin-astro/hmr.ts
@@ -1,6 +1,6 @@
import { fileURLToPath } from 'node:url';
import type { HmrContext, ModuleNode } from 'vite';
-import type { AstroConfig } from '../@types/astro';
+import type { AstroConfig } from '../@types/astro.js';
import {
cachedCompilation,
invalidateCompilation,
diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts
index abeade65e..1649d8069 100644
--- a/packages/astro/src/vite-plugin-astro/index.ts
+++ b/packages/astro/src/vite-plugin-astro/index.ts
@@ -1,8 +1,8 @@
import type { SourceDescription } from 'rollup';
import type * as vite from 'vite';
-import type { AstroSettings } from '../@types/astro';
+import type { AstroSettings } from '../@types/astro.js';
import type { Logger } from '../core/logger/core.js';
-import type { PluginMetadata as AstroPluginMetadata } from './types';
+import type { PluginMetadata as AstroPluginMetadata } from './types.js';
import { normalizePath } from 'vite';
import {
diff --git a/packages/astro/src/vite-plugin-astro/metadata.ts b/packages/astro/src/vite-plugin-astro/metadata.ts
index ee66c12d0..d0a2b3644 100644
--- a/packages/astro/src/vite-plugin-astro/metadata.ts
+++ b/packages/astro/src/vite-plugin-astro/metadata.ts
@@ -1,5 +1,5 @@
-import type { ModuleInfo } from '../core/module-loader';
-import type { PluginMetadata } from './types';
+import type { ModuleInfo } from '../core/module-loader/index.js';
+import type { PluginMetadata } from './types.js';
export function getAstroMetadata(modInfo: ModuleInfo): PluginMetadata['astro'] | undefined {
if (modInfo.meta?.astro) {
diff --git a/packages/astro/src/vite-plugin-astro/types.ts b/packages/astro/src/vite-plugin-astro/types.ts
index 8b74d7f33..49bbd5fea 100644
--- a/packages/astro/src/vite-plugin-astro/types.ts
+++ b/packages/astro/src/vite-plugin-astro/types.ts
@@ -1,5 +1,5 @@
import type { TransformResult } from '@astrojs/compiler';
-import type { PropagationHint } from '../@types/astro';
+import type { PropagationHint } from '../@types/astro.js';
export interface PageOptions {
prerender?: boolean;
diff --git a/packages/astro/src/vite-plugin-config-alias/index.ts b/packages/astro/src/vite-plugin-config-alias/index.ts
index 3df286047..8b8535af9 100644
--- a/packages/astro/src/vite-plugin-config-alias/index.ts
+++ b/packages/astro/src/vite-plugin-config-alias/index.ts
@@ -1,6 +1,6 @@
import path from 'node:path';
import { normalizePath, type ResolvedConfig, type Plugin as VitePlugin } from 'vite';
-import type { AstroSettings } from '../@types/astro';
+import type { AstroSettings } from '../@types/astro.js';
type Alias = {
find: RegExp;
diff --git a/packages/astro/src/vite-plugin-env/index.ts b/packages/astro/src/vite-plugin-env/index.ts
index 2b9f04cd4..1958344e5 100644
--- a/packages/astro/src/vite-plugin-env/index.ts
+++ b/packages/astro/src/vite-plugin-env/index.ts
@@ -2,7 +2,7 @@ import MagicString from 'magic-string';
import { fileURLToPath } from 'node:url';
import type * as vite from 'vite';
import { loadEnv } from 'vite';
-import type { AstroConfig, AstroSettings } from '../@types/astro';
+import type { AstroConfig, AstroSettings } from '../@types/astro.js';
interface EnvPluginOptions {
settings: AstroSettings;
diff --git a/packages/astro/src/vite-plugin-head/index.ts b/packages/astro/src/vite-plugin-head/index.ts
index 9b0a7fb55..f8a13f925 100644
--- a/packages/astro/src/vite-plugin-head/index.ts
+++ b/packages/astro/src/vite-plugin-head/index.ts
@@ -1,8 +1,8 @@
import type { ModuleInfo } from 'rollup';
import type * as vite from 'vite';
-import type { SSRComponentMetadata, SSRResult } from '../@types/astro';
+import type { SSRComponentMetadata, SSRResult } from '../@types/astro.js';
import type { AstroBuildPlugin } from '../core/build/plugin.js';
-import type { PluginMetadata } from '../vite-plugin-astro/types';
+import type { PluginMetadata } from '../vite-plugin-astro/types.js';
import { getTopLevelPages, walkParentInfos } from '../core/build/graph.js';
import type { BuildInternals } from '../core/build/internal.js';
diff --git a/packages/astro/src/vite-plugin-markdown/index.ts b/packages/astro/src/vite-plugin-markdown/index.ts
index deaccebef..41cf08e42 100644
--- a/packages/astro/src/vite-plugin-markdown/index.ts
+++ b/packages/astro/src/vite-plugin-markdown/index.ts
@@ -9,7 +9,7 @@ import path from 'node:path';
import { fileURLToPath } from 'node:url';
import type { Plugin } from 'vite';
import { normalizePath } from 'vite';
-import type { AstroSettings } from '../@types/astro';
+import type { AstroSettings } from '../@types/astro.js';
import { AstroError, AstroErrorData, MarkdownError } from '../core/errors/index.js';
import type { Logger } from '../core/logger/core.js';
import { isMarkdownFile, rootRelativePath } from '../core/util.js';
diff --git a/packages/astro/src/vite-plugin-mdx/index.ts b/packages/astro/src/vite-plugin-mdx/index.ts
index b640d6c80..5e2ce2a98 100644
--- a/packages/astro/src/vite-plugin-mdx/index.ts
+++ b/packages/astro/src/vite-plugin-mdx/index.ts
@@ -1,8 +1,8 @@
import type { TransformResult } from 'rollup';
import { transformWithEsbuild, type Plugin, type ResolvedConfig } from 'vite';
-import type { AstroRenderer, AstroSettings } from '../@types/astro';
+import type { AstroRenderer, AstroSettings } from '../@types/astro.js';
import type { Logger } from '../core/logger/core.js';
-import type { PluginMetadata } from '../vite-plugin-astro/types';
+import type { PluginMetadata } from '../vite-plugin-astro/types.js';
import babel from '@babel/core';
import { CONTENT_FLAG, PROPAGATED_ASSET_FLAG } from '../content/index.js';
diff --git a/packages/astro/src/vite-plugin-utils/index.ts b/packages/astro/src/vite-plugin-utils/index.ts
index 468360372..51f0e6cc4 100644
--- a/packages/astro/src/vite-plugin-utils/index.ts
+++ b/packages/astro/src/vite-plugin-utils/index.ts
@@ -1,6 +1,6 @@
import ancestor from 'common-ancestor-path';
import { fileURLToPath } from 'node:url';
-import type { AstroConfig } from '../@types/astro';
+import type { AstroConfig } from '../@types/astro.js';
import {
appendExtension,
appendForwardSlash,
diff --git a/packages/astro/tsconfig.json b/packages/astro/tsconfig.json
index d8bd9b197..e36a58321 100644
--- a/packages/astro/tsconfig.json
+++ b/packages/astro/tsconfig.json
@@ -4,9 +4,7 @@
"compilerOptions": {
"allowJs": true,
"declarationDir": "./dist",
- "module": "ES2022",
"outDir": "./dist",
- "target": "ES2022",
"jsx": "preserve",
"types": ["@types/dom-view-transitions", "network-information-types"]
}
diff --git a/packages/astro/types.d.ts b/packages/astro/types.d.ts
index 0939c828a..da48b5e1b 100644
--- a/packages/astro/types.d.ts
+++ b/packages/astro/types.d.ts
@@ -1,5 +1,5 @@
import './astro-jsx';
-import { AstroBuiltinAttributes } from './dist/@types/astro';
+import { AstroBuiltinAttributes } from './dist/@types/astro.js';
/** Any supported HTML or SVG element name, as defined by the HTML specification */
export type HTMLTag = keyof astroHTML.JSX.DefinedIntrinsicElements;
diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json
index b9641b1d5..7a341d125 100644
--- a/packages/create-astro/package.json
+++ b/packages/create-astro/package.json
@@ -31,7 +31,7 @@
"//a": "MOST PACKAGES SHOULD GO IN DEV_DEPENDENCIES! THEY WILL BE BUNDLED.",
"//b": "DEPENDENCIES IS FOR UNBUNDLED PACKAGES",
"dependencies": {
- "@astrojs/cli-kit": "^0.2.5",
+ "@astrojs/cli-kit": "^0.3.0",
"giget": "1.1.2"
},
"devDependencies": {
diff --git a/packages/create-astro/src/actions/dependencies.ts b/packages/create-astro/src/actions/dependencies.ts
index f05e9e93a..1e731099c 100644
--- a/packages/create-astro/src/actions/dependencies.ts
+++ b/packages/create-astro/src/actions/dependencies.ts
@@ -3,7 +3,7 @@ import fs from 'node:fs';
import path from 'node:path';
import { error, info, spinner, title } from '../messages.js';
import { shell } from '../shell.js';
-import type { Context } from './context';
+import type { Context } from './context.js';
export async function dependencies(
ctx: Pick<Context, 'install' | 'yes' | 'prompt' | 'packageManager' | 'cwd' | 'dryRun'>
diff --git a/packages/create-astro/src/actions/git.ts b/packages/create-astro/src/actions/git.ts
index c2a59b0b3..dd703b1f5 100644
--- a/packages/create-astro/src/actions/git.ts
+++ b/packages/create-astro/src/actions/git.ts
@@ -1,6 +1,6 @@
import fs from 'node:fs';
import path from 'node:path';
-import type { Context } from './context';
+import type { Context } from './context.js';
import { color } from '@astrojs/cli-kit';
import { error, info, spinner, title } from '../messages.js';
diff --git a/packages/create-astro/src/actions/intro.ts b/packages/create-astro/src/actions/intro.ts
index 2a6e866c8..1781fb260 100644
--- a/packages/create-astro/src/actions/intro.ts
+++ b/packages/create-astro/src/actions/intro.ts
@@ -1,4 +1,4 @@
-import type { Context } from './context';
+import type { Context } from './context.js';
import { color, label } from '@astrojs/cli-kit';
import { random } from '@astrojs/cli-kit/utils';
diff --git a/packages/create-astro/src/actions/next-steps.ts b/packages/create-astro/src/actions/next-steps.ts
index ac69b7e94..86907abf5 100644
--- a/packages/create-astro/src/actions/next-steps.ts
+++ b/packages/create-astro/src/actions/next-steps.ts
@@ -1,5 +1,5 @@
import path from 'node:path';
-import type { Context } from './context';
+import type { Context } from './context.js';
import { nextSteps, say } from '../messages.js';
diff --git a/packages/create-astro/src/actions/project-name.ts b/packages/create-astro/src/actions/project-name.ts
index b7099d9bb..533240efd 100644
--- a/packages/create-astro/src/actions/project-name.ts
+++ b/packages/create-astro/src/actions/project-name.ts
@@ -1,4 +1,4 @@
-import type { Context } from './context';
+import type { Context } from './context.js';
import { color, generateProjectName } from '@astrojs/cli-kit';
import path from 'node:path';
diff --git a/packages/create-astro/src/actions/template.ts b/packages/create-astro/src/actions/template.ts
index 3d3d1075d..60a77104f 100644
--- a/packages/create-astro/src/actions/template.ts
+++ b/packages/create-astro/src/actions/template.ts
@@ -1,4 +1,4 @@
-import type { Context } from './context';
+import type { Context } from './context.js';
import { color } from '@astrojs/cli-kit';
import { downloadTemplate } from 'giget';
diff --git a/packages/create-astro/src/actions/typescript.ts b/packages/create-astro/src/actions/typescript.ts
index 8c0e2716c..97ae24303 100644
--- a/packages/create-astro/src/actions/typescript.ts
+++ b/packages/create-astro/src/actions/typescript.ts
@@ -1,4 +1,4 @@
-import type { Context } from './context';
+import type { Context } from './context.js';
import { color } from '@astrojs/cli-kit';
import fs from 'node:fs';
diff --git a/packages/create-astro/src/actions/verify.ts b/packages/create-astro/src/actions/verify.ts
index 2df256ae9..ac3eae484 100644
--- a/packages/create-astro/src/actions/verify.ts
+++ b/packages/create-astro/src/actions/verify.ts
@@ -1,4 +1,4 @@
-import type { Context } from './context';
+import type { Context } from './context.js';
import { color } from '@astrojs/cli-kit';
import dns from 'node:dns/promises';
diff --git a/packages/create-astro/tsconfig.json b/packages/create-astro/tsconfig.json
index 1ab34c5a2..18443cddf 100644
--- a/packages/create-astro/tsconfig.json
+++ b/packages/create-astro/tsconfig.json
@@ -1,13 +1,7 @@
{
"extends": "../../tsconfig.base.json",
- "include": ["src", "index.d.ts"],
+ "include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "emitDeclarationOnly": false,
- "noEmit": true,
- "target": "ES2022",
- "module": "ES2022",
- "outDir": "./dist",
- "declarationDir": "./dist/types"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/alpinejs/tsconfig.json b/packages/integrations/alpinejs/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/alpinejs/tsconfig.json
+++ b/packages/integrations/alpinejs/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json
index 1fc188e02..ef17b0ec7 100644
--- a/packages/integrations/cloudflare/package.json
+++ b/packages/integrations/cloudflare/package.json
@@ -41,19 +41,20 @@
"dependencies": {
"@astrojs/underscore-redirects": "workspace:*",
"@cloudflare/workers-types": "^4.20230821.0",
- "esbuild": "^0.19.2",
- "tiny-glob": "^0.2.9",
- "find-up": "^6.3.0",
"@iarna/toml": "^2.2.5",
- "dotenv": "^16.3.1",
"@miniflare/cache": "^2.14.1",
"@miniflare/shared": "^2.14.1",
- "@miniflare/storage-memory": "^2.14.1"
+ "@miniflare/storage-memory": "^2.14.1",
+ "dotenv": "^16.3.1",
+ "esbuild": "^0.19.2",
+ "find-up": "^6.3.0",
+ "tiny-glob": "^0.2.9"
},
"peerDependencies": {
"astro": "workspace:^3.0.13"
},
"devDependencies": {
+ "@types/iarna__toml": "^2.0.2",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
diff --git a/packages/integrations/cloudflare/src/index.ts b/packages/integrations/cloudflare/src/index.ts
index c70c9c5aa..b64d986af 100644
--- a/packages/integrations/cloudflare/src/index.ts
+++ b/packages/integrations/cloudflare/src/index.ts
@@ -14,8 +14,8 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
import glob from 'tiny-glob';
import { getEnvVars } from './parser.js';
-export type { AdvancedRuntime } from './server.advanced';
-export type { DirectoryRuntime } from './server.directory';
+export type { AdvancedRuntime } from './server.advanced.js';
+export type { DirectoryRuntime } from './server.directory.js';
type Options = {
mode?: 'directory' | 'advanced';
diff --git a/packages/integrations/cloudflare/tsconfig.json b/packages/integrations/cloudflare/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/cloudflare/tsconfig.json
+++ b/packages/integrations/cloudflare/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/deno/tsconfig.json b/packages/integrations/deno/tsconfig.json
index f3c96447a..d999917aa 100644
--- a/packages/integrations/deno/tsconfig.json
+++ b/packages/integrations/deno/tsconfig.json
@@ -2,11 +2,9 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
"module": "ES2022",
"outDir": "./dist",
- "target": "ES2022",
- // TODO: Due to the shim for Deno imports in `server.ts`, we can't use moduleResolution: 'bundler' or the types get very weird.
+ // TODO: Due to the shim for Deno imports in `server.ts`, we can't use moduleResolution: 'node16' or the types get very weird.
"moduleResolution": "Node"
}
}
diff --git a/packages/integrations/lit/tsconfig.json b/packages/integrations/lit/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/lit/tsconfig.json
+++ b/packages/integrations/lit/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/markdoc/src/html/index.ts b/packages/integrations/markdoc/src/html/index.ts
index 8798d3c9a..3f947736c 100644
--- a/packages/integrations/markdoc/src/html/index.ts
+++ b/packages/integrations/markdoc/src/html/index.ts
@@ -1,2 +1,2 @@
-export { htmlTag } from './tagdefs/html.tag';
-export { htmlTokenTransform } from './transform/html-token-transform';
+export { htmlTag } from './tagdefs/html.tag.js';
+export { htmlTokenTransform } from './transform/html-token-transform.js';
diff --git a/packages/integrations/markdoc/src/html/transform/html-token-transform.ts b/packages/integrations/markdoc/src/html/transform/html-token-transform.ts
index cfa511a9f..10796cdc0 100644
--- a/packages/integrations/markdoc/src/html/transform/html-token-transform.ts
+++ b/packages/integrations/markdoc/src/html/transform/html-token-transform.ts
@@ -1,5 +1,6 @@
import type { Tokenizer } from '@markdoc/markdoc';
import { Parser } from 'htmlparser2';
+// @ts-expect-error This type isn't exported
import type * as Token from 'markdown-it/lib/token';
export function htmlTokenTransform(tokenizer: Tokenizer, tokens: Token[]): Token[] {
diff --git a/packages/integrations/markdoc/tsconfig.json b/packages/integrations/markdoc/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/markdoc/tsconfig.json
+++ b/packages/integrations/markdoc/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/mdx/tsconfig.json b/packages/integrations/mdx/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/mdx/tsconfig.json
+++ b/packages/integrations/mdx/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/netlify/tsconfig.json b/packages/integrations/netlify/tsconfig.json
index 66b0102c7..4095e9b83 100644
--- a/packages/integrations/netlify/tsconfig.json
+++ b/packages/integrations/netlify/tsconfig.json
@@ -2,11 +2,7 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
"outDir": "./dist",
- "target": "ES2022",
- "typeRoots": ["node_modules/@types", "node_modules/@netlify"],
- "allowImportingTsExtensions": true
+ "typeRoots": ["node_modules/@types", "node_modules/@netlify"]
}
}
diff --git a/packages/integrations/node/src/index.ts b/packages/integrations/node/src/index.ts
index 5afc49f6a..5978371e4 100644
--- a/packages/integrations/node/src/index.ts
+++ b/packages/integrations/node/src/index.ts
@@ -1,6 +1,6 @@
import type { AstroAdapter, AstroIntegration } from 'astro';
import { AstroError } from 'astro/errors';
-import type { Options, UserOptions } from './types';
+import type { Options, UserOptions } from './types.js';
export function getAdapter(options: Options): AstroAdapter {
return {
name: '@astrojs/node',
diff --git a/packages/integrations/node/src/nodeMiddleware.ts b/packages/integrations/node/src/nodeMiddleware.ts
index 1e0aaea0f..32b8020dc 100644
--- a/packages/integrations/node/src/nodeMiddleware.ts
+++ b/packages/integrations/node/src/nodeMiddleware.ts
@@ -1,9 +1,9 @@
import type { NodeApp } from 'astro/app/node';
import type { ServerResponse } from 'node:http';
import type { Readable } from 'stream';
-import { createOutgoingHttpHeaders } from './createOutgoingHttpHeaders';
-import { responseIterator } from './response-iterator';
-import type { ErrorHandlerParams, Options, RequestHandlerParams } from './types';
+import { createOutgoingHttpHeaders } from './createOutgoingHttpHeaders.js';
+import { responseIterator } from './response-iterator.js';
+import type { ErrorHandlerParams, Options, RequestHandlerParams } from './types.js';
// Disable no-unused-vars to avoid breaking signature change
export default function (app: NodeApp, mode: Options['mode']) {
diff --git a/packages/integrations/node/src/preview.ts b/packages/integrations/node/src/preview.ts
index 77560d734..70ed54698 100644
--- a/packages/integrations/node/src/preview.ts
+++ b/packages/integrations/node/src/preview.ts
@@ -4,7 +4,7 @@ import type http from 'node:http';
import { fileURLToPath } from 'node:url';
import { getNetworkAddress } from './get-network-address.js';
import { createServer } from './http-server.js';
-import type { createExports } from './server';
+import type { createExports } from './server.js';
const preview: CreatePreviewServer = async function ({
client,
diff --git a/packages/integrations/node/src/server.ts b/packages/integrations/node/src/server.ts
index 04c81c2d1..90bf8c44c 100644
--- a/packages/integrations/node/src/server.ts
+++ b/packages/integrations/node/src/server.ts
@@ -2,7 +2,7 @@ import type { SSRManifest } from 'astro';
import { NodeApp, applyPolyfills } from 'astro/app/node';
import middleware from './nodeMiddleware.js';
import startServer from './standalone.js';
-import type { Options } from './types';
+import type { Options } from './types.js';
applyPolyfills();
export function createExports(manifest: SSRManifest, options: Options) {
diff --git a/packages/integrations/node/src/standalone.ts b/packages/integrations/node/src/standalone.ts
index 66d1b9c6a..abe40ff5c 100644
--- a/packages/integrations/node/src/standalone.ts
+++ b/packages/integrations/node/src/standalone.ts
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
import { getNetworkAddress } from './get-network-address.js';
import { createServer } from './http-server.js';
import middleware from './nodeMiddleware.js';
-import type { Options } from './types';
+import type { Options } from './types.js';
function resolvePaths(options: Options) {
const clientURLRaw = new URL(options.client);
diff --git a/packages/integrations/node/tsconfig.json b/packages/integrations/node/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/node/tsconfig.json
+++ b/packages/integrations/node/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/partytown/tsconfig.json b/packages/integrations/partytown/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/partytown/tsconfig.json
+++ b/packages/integrations/partytown/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/preact/src/client.ts b/packages/integrations/preact/src/client.ts
index b64431130..050a86f8a 100644
--- a/packages/integrations/preact/src/client.ts
+++ b/packages/integrations/preact/src/client.ts
@@ -1,6 +1,6 @@
import { h, hydrate, render } from 'preact';
import StaticHtml from './static-html.js';
-import type { SignalLike } from './types';
+import type { SignalLike } from './types.js';
const sharedSignalMap = new Map<string, SignalLike>();
diff --git a/packages/integrations/preact/src/context.ts b/packages/integrations/preact/src/context.ts
index c711017c4..4d2398d28 100644
--- a/packages/integrations/preact/src/context.ts
+++ b/packages/integrations/preact/src/context.ts
@@ -1,4 +1,4 @@
-import type { PropNameToSignalMap, RendererContext, SignalLike } from './types';
+import type { PropNameToSignalMap, RendererContext, SignalLike } from './types.js';
export type Context = {
id: string;
diff --git a/packages/integrations/preact/src/index.ts b/packages/integrations/preact/src/index.ts
index 85c3c66ec..85f9bed0f 100644
--- a/packages/integrations/preact/src/index.ts
+++ b/packages/integrations/preact/src/index.ts
@@ -1,4 +1,4 @@
-import preact, { type PreactPluginOptions as VitePreactPluginOptions } from '@preact/preset-vite';
+import { preact, type PreactPluginOptions as VitePreactPluginOptions } from '@preact/preset-vite';
import type { AstroIntegration, AstroRenderer, ViteUserConfig } from 'astro';
import { fileURLToPath } from 'node:url';
diff --git a/packages/integrations/preact/src/server.ts b/packages/integrations/preact/src/server.ts
index e55d29d1c..a395433c9 100644
--- a/packages/integrations/preact/src/server.ts
+++ b/packages/integrations/preact/src/server.ts
@@ -1,10 +1,10 @@
import type { AstroComponentMetadata } from 'astro';
import { Component as BaseComponent, h, type VNode } from 'preact';
-import render from 'preact-render-to-string';
+import { render } from 'preact-render-to-string';
import { getContext } from './context.js';
import { restoreSignalsOnProps, serializeSignals } from './signals.js';
import StaticHtml from './static-html.js';
-import type { AstroPreactAttrs, RendererContext } from './types';
+import type { AstroPreactAttrs, RendererContext } from './types.js';
const slotName = (str: string) => str.trim().replace(/[-_]([a-z])/g, (_, w) => w.toUpperCase());
diff --git a/packages/integrations/preact/src/signals.ts b/packages/integrations/preact/src/signals.ts
index 3fa1529f4..ef3a4b70a 100644
--- a/packages/integrations/preact/src/signals.ts
+++ b/packages/integrations/preact/src/signals.ts
@@ -1,6 +1,6 @@
-import type { Context } from './context';
+import type { Context } from './context.js';
import { incrementId } from './context.js';
-import type { AstroPreactAttrs, PropNameToSignalMap, SignalLike } from './types';
+import type { AstroPreactAttrs, PropNameToSignalMap, SignalLike } from './types.js';
function isSignal(x: any): x is SignalLike {
return x != null && typeof x === 'object' && typeof x.peek === 'function' && 'value' in x;
diff --git a/packages/integrations/preact/tsconfig.json b/packages/integrations/preact/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/preact/tsconfig.json
+++ b/packages/integrations/preact/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/prefetch/tsconfig.json b/packages/integrations/prefetch/tsconfig.json
index 6457dfe8c..dadc37a82 100644
--- a/packages/integrations/prefetch/tsconfig.json
+++ b/packages/integrations/prefetch/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src", "@types"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts
index d5f696522..e4b977880 100644
--- a/packages/integrations/react/src/index.ts
+++ b/packages/integrations/react/src/index.ts
@@ -7,6 +7,7 @@ export type ReactIntegrationOptions = Pick<ViteReactPluginOptions, 'include' | '
experimentalReactChildren?: boolean;
};
+// @ts-expect-error
const FAST_REFRESH_PREAMBLE = react.preambleCode;
function getRenderer() {
@@ -65,6 +66,7 @@ function getViteConfiguration({
: '@astrojs/react/server-v17.js',
],
},
+ // @ts-expect-error
plugins: [react({ include, exclude }), optionsPlugin(!!experimentalReactChildren)],
resolve: {
dedupe: ['react', 'react-dom', 'react-dom/server'],
diff --git a/packages/integrations/react/tsconfig.json b/packages/integrations/react/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/react/tsconfig.json
+++ b/packages/integrations/react/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/sitemap/tsconfig.json b/packages/integrations/sitemap/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/sitemap/tsconfig.json
+++ b/packages/integrations/sitemap/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/solid/src/context.ts b/packages/integrations/solid/src/context.ts
index 4846ee212..e18ead749 100644
--- a/packages/integrations/solid/src/context.ts
+++ b/packages/integrations/solid/src/context.ts
@@ -1,4 +1,4 @@
-import type { RendererContext } from './types';
+import type { RendererContext } from './types.js';
type Context = {
id: string;
diff --git a/packages/integrations/solid/src/server.ts b/packages/integrations/solid/src/server.ts
index df2c2fce2..6e371da51 100644
--- a/packages/integrations/solid/src/server.ts
+++ b/packages/integrations/solid/src/server.ts
@@ -1,6 +1,6 @@
import { createComponent, renderToString, ssr } from 'solid-js/web';
import { getContext, incrementId } from './context.js';
-import type { RendererContext } from './types';
+import type { RendererContext } from './types.js';
const slotName = (str: string) => str.trim().replace(/[-_]([a-z])/g, (_, w) => w.toUpperCase());
diff --git a/packages/integrations/solid/tsconfig.json b/packages/integrations/solid/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/solid/tsconfig.json
+++ b/packages/integrations/solid/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/svelte/tsconfig.json b/packages/integrations/svelte/tsconfig.json
index af1b43564..5742d1f6e 100644
--- a/packages/integrations/svelte/tsconfig.json
+++ b/packages/integrations/svelte/tsconfig.json
@@ -2,9 +2,7 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
"outDir": "./dist",
- "target": "ES2022"
+ "verbatimModuleSyntax": false
}
}
diff --git a/packages/integrations/tailwind/src/index.ts b/packages/integrations/tailwind/src/index.ts
index df0f01723..700f16937 100644
--- a/packages/integrations/tailwind/src/index.ts
+++ b/packages/integrations/tailwind/src/index.ts
@@ -33,6 +33,7 @@ async function getViteConfiguration(
const postcssOptions = postcssConfigResult?.options ?? {};
const postcssPlugins = postcssConfigResult?.plugins?.slice() ?? [];
+ // @ts-expect-error Tailwind plugin types are wrong
postcssPlugins.push(tailwindPlugin(tailwindConfigPath) as ResultPlugin);
postcssPlugins.push(autoprefixerPlugin());
diff --git a/packages/integrations/tailwind/tsconfig.json b/packages/integrations/tailwind/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/tailwind/tsconfig.json
+++ b/packages/integrations/tailwind/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/vercel/src/image/build-service.ts b/packages/integrations/vercel/src/image/build-service.ts
index 63a37a5fe..0e45167d4 100644
--- a/packages/integrations/vercel/src/image/build-service.ts
+++ b/packages/integrations/vercel/src/image/build-service.ts
@@ -1,5 +1,5 @@
import type { ExternalImageService } from 'astro';
-import { isESMImportedImage, sharedValidateOptions } from './shared';
+import { isESMImportedImage, sharedValidateOptions } from './shared.js';
const service: ExternalImageService = {
validateOptions: (options, serviceOptions) =>
diff --git a/packages/integrations/vercel/src/image/dev-service.ts b/packages/integrations/vercel/src/image/dev-service.ts
index 72eb7ca0b..a335c8d23 100644
--- a/packages/integrations/vercel/src/image/dev-service.ts
+++ b/packages/integrations/vercel/src/image/dev-service.ts
@@ -1,6 +1,6 @@
import type { LocalImageService } from 'astro';
import squooshService from 'astro/assets/services/squoosh';
-import { sharedValidateOptions } from './shared';
+import { sharedValidateOptions } from './shared.js';
const service: LocalImageService = {
validateOptions: (options, serviceOptions) =>
diff --git a/packages/integrations/vercel/src/serverless/entrypoint.ts b/packages/integrations/vercel/src/serverless/entrypoint.ts
index f132d71f3..7b548dc37 100644
--- a/packages/integrations/vercel/src/serverless/entrypoint.ts
+++ b/packages/integrations/vercel/src/serverless/entrypoint.ts
@@ -3,8 +3,8 @@ import { App } from 'astro/app';
import { applyPolyfills } from 'astro/app/node';
import type { IncomingMessage, ServerResponse } from 'node:http';
-import { ASTRO_LOCALS_HEADER } from './adapter';
-import { getRequest, setResponse } from './request-transform';
+import { ASTRO_LOCALS_HEADER } from './adapter.js';
+import { getRequest, setResponse } from './request-transform.js';
applyPolyfills();
diff --git a/packages/integrations/vercel/tsconfig.json b/packages/integrations/vercel/tsconfig.json
index af1b43564..1504b4b6d 100644
--- a/packages/integrations/vercel/tsconfig.json
+++ b/packages/integrations/vercel/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
- "outDir": "./dist",
- "target": "ES2022"
+ "outDir": "./dist"
}
}
diff --git a/packages/integrations/vue/tsconfig.json b/packages/integrations/vue/tsconfig.json
index af1b43564..5742d1f6e 100644
--- a/packages/integrations/vue/tsconfig.json
+++ b/packages/integrations/vue/tsconfig.json
@@ -2,9 +2,7 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "module": "ES2022",
"outDir": "./dist",
- "target": "ES2022"
+ "verbatimModuleSyntax": false
}
}
diff --git a/packages/internal-helpers/tsconfig.json b/packages/internal-helpers/tsconfig.json
index fd652e629..18443cddf 100644
--- a/packages/internal-helpers/tsconfig.json
+++ b/packages/internal-helpers/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "target": "ES2022",
- "module": "ES2022",
"outDir": "./dist"
}
}
diff --git a/packages/markdown/remark/src/index.ts b/packages/markdown/remark/src/index.ts
index c54826bdc..d81d1702e 100644
--- a/packages/markdown/remark/src/index.ts
+++ b/packages/markdown/remark/src/index.ts
@@ -3,7 +3,7 @@ import type {
MarkdownRenderingOptions,
MarkdownRenderingResult,
MarkdownVFile,
-} from './types';
+} from './types.js';
import { toRemarkInitializeAstroData } from './frontmatter-injection.js';
import { loadPlugins } from './load-plugins.js';
diff --git a/packages/markdown/remark/src/remark-collect-images.ts b/packages/markdown/remark/src/remark-collect-images.ts
index a9f524f7a..ecaa82d1d 100644
--- a/packages/markdown/remark/src/remark-collect-images.ts
+++ b/packages/markdown/remark/src/remark-collect-images.ts
@@ -1,6 +1,6 @@
import type { Image } from 'mdast';
import { visit } from 'unist-util-visit';
-import type { MarkdownVFile } from './types';
+import type { MarkdownVFile } from './types.js';
export function remarkCollectImages() {
return function (tree: any, vfile: MarkdownVFile) {
diff --git a/packages/markdown/remark/tsconfig.json b/packages/markdown/remark/tsconfig.json
index 9a8c6d8cb..1504b4b6d 100644
--- a/packages/markdown/remark/tsconfig.json
+++ b/packages/markdown/remark/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "target": "ES2022",
- "module": "ES2022",
"outDir": "./dist"
}
}
diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json
index 8f8a634bf..d4082091d 100644
--- a/packages/telemetry/package.json
+++ b/packages/telemetry/package.json
@@ -2,7 +2,7 @@
"name": "@astrojs/telemetry",
"version": "3.0.1",
"type": "module",
- "types": "./dist/types/index.d.ts",
+ "types": "./dist/index.d.ts",
"author": "withastro",
"license": "MIT",
"repository": {
@@ -14,7 +14,7 @@
"homepage": "https://astro.build",
"exports": {
".": {
- "types": "./dist/types/index.d.ts",
+ "types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"./package.json": "./package.json"
diff --git a/packages/telemetry/tsconfig.json b/packages/telemetry/tsconfig.json
index 451badc02..18443cddf 100644
--- a/packages/telemetry/tsconfig.json
+++ b/packages/telemetry/tsconfig.json
@@ -2,10 +2,6 @@
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "target": "ES2022",
- "module": "ES2022",
- "outDir": "./dist",
- "declarationDir": "./dist/types"
+ "outDir": "./dist"
}
}
diff --git a/packages/underscore-redirects/src/print.ts b/packages/underscore-redirects/src/print.ts
index 5d7bd2387..2a9bec257 100644
--- a/packages/underscore-redirects/src/print.ts
+++ b/packages/underscore-redirects/src/print.ts
@@ -1,4 +1,4 @@
-import type { RedirectDefinition } from './redirects';
+import type { RedirectDefinition } from './redirects.js';
/**
* Pretty print a list of definitions into the output format. Keeps
diff --git a/packages/underscore-redirects/tsconfig.json b/packages/underscore-redirects/tsconfig.json
index fd652e629..18443cddf 100644
--- a/packages/underscore-redirects/tsconfig.json
+++ b/packages/underscore-redirects/tsconfig.json
@@ -2,9 +2,6 @@
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
- "allowJs": true,
- "target": "ES2022",
- "module": "ES2022",
"outDir": "./dist"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 470bd046b..08cbf3643 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -3566,8 +3566,8 @@ importers:
packages/create-astro:
dependencies:
'@astrojs/cli-kit':
- specifier: ^0.2.5
- version: 0.2.5
+ specifier: ^0.3.0
+ version: 0.3.0
giget:
specifier: 1.1.2
version: 1.1.2
@@ -3635,6 +3635,9 @@ importers:
specifier: ^0.2.9
version: 0.2.9
devDependencies:
+ '@types/iarna__toml':
+ specifier: ^2.0.2
+ version: 2.0.2
astro:
specifier: workspace:*
version: link:../../astro
@@ -5176,8 +5179,9 @@ packages:
- prettier-plugin-astro
dev: true
- /@astrojs/cli-kit@0.2.5:
- resolution: {integrity: sha512-j6zpNUjtHJGEIKkTrTPvQD3G/sJUKyseJty42iVR3HqytzqHwLK165vptdT4NZKfZ082yLnUtsOXxRyIdfm/AQ==}
+ /@astrojs/cli-kit@0.3.0:
+ resolution: {integrity: sha512-nil0Kz2xuzR3xQX+FVHg2W8g+FvbeUeoCeU53duQjAFuHRJrbqWRmgfjYeM6f2780dsSuGiYMXmY+IaJqaqiaw==}
+ engines: {node: '>=18.14.1'}
dependencies:
chalk: 5.3.0
log-update: 5.0.1
@@ -8797,6 +8801,12 @@ packages:
resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==}
dev: true
+ /@types/iarna__toml@2.0.2:
+ resolution: {integrity: sha512-Q3obxKhBLVVbEQ8zsAmsQVobAAZhi8dFFFjF0q5xKXiaHvH8IkSxcbM27e46M9feUMieR03SPpmp5CtaNzpdBg==}
+ dependencies:
+ '@types/node': 18.17.8
+ dev: true
+
/@types/is-ci@3.0.0:
resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==}
dependencies:
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 337005ad4..0349af8a1 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -1,10 +1,12 @@
{
+ "$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"strict": true,
- // All packages are built with ESBuild, so we can use `moduleResolution: 'bundler'`
- "moduleResolution": "Bundler",
+ "moduleResolution": "Node16",
+ "target": "ES2022",
+ "module": "Node16",
"esModuleInterop": true,
"skipLibCheck": true,
"verbatimModuleSyntax": true