Fix astro/app import (#7821)
* core -> core.js * changeset * test --------- Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This commit is contained in:
parent
2f06923764
commit
c00b6f0c49
4 changed files with 25 additions and 1 deletions
5
.changeset/four-ways-tap.md
Normal file
5
.changeset/four-ways-tap.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes an issue that prevents importing `'astro/app'`
|
|
@ -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,
|
||||
|
|
13
packages/astro/test/import-app.test.js
Normal file
13
packages/astro/test/import-app.test.js
Normal file
|
@ -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}`);
|
||||
}
|
||||
});
|
||||
});
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue