diff --git a/.changeset/four-ways-tap.md b/.changeset/four-ways-tap.md new file mode 100644 index 000000000..89af56e0a --- /dev/null +++ b/.changeset/four-ways-tap.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes an issue that prevents importing `'astro/app'` diff --git a/packages/astro/src/core/app/index.ts b/packages/astro/src/core/app/index.ts index 288385598..da025609a 100644 --- a/packages/astro/src/core/app/index.ts +++ b/packages/astro/src/core/app/index.ts @@ -12,7 +12,7 @@ import { consoleLogDestination } from '../logger/console.js'; import { error, type LogOptions } from '../logger/core.js'; import { prependForwardSlash, removeTrailingForwardSlash } from '../path.js'; import { RedirectSinglePageBuiltModule } from '../redirects/index.js'; -import { isResponse } from '../render/core'; +import { isResponse } from '../render/core.js'; import { createEnvironment, createRenderContext, diff --git a/packages/astro/test/import-app.test.js b/packages/astro/test/import-app.test.js new file mode 100644 index 000000000..7ac536306 --- /dev/null +++ b/packages/astro/test/import-app.test.js @@ -0,0 +1,13 @@ +import { expect } from 'chai'; + +describe('Import astro/app', async () => { + + it('Successfully imports astro/app', async () => { + try { + await import('astro/app'); + expect(true).to.be.true; + } catch (err) { + expect.fail(undefined, undefined, `Importing astro/app should not throw an error: ${err}`); + } + }); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 82c130ed9..3d66633af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2721,6 +2721,12 @@ importers: specifier: ^10.15.1 version: 10.15.1 + packages/astro/test/fixtures/import-app: + dependencies: + astro: + specifier: workspace:* + version: link:../../.. + packages/astro/test/fixtures/import-ts-with-js: dependencies: astro: