mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
fix(db): import base virtual module ID (#12628)
This commit is contained in:
parent
24edead67a
commit
348c71ecdc
2 changed files with 7 additions and 2 deletions
5
.changeset/red-emus-repair.md
Normal file
5
.changeset/red-emus-repair.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'@astrojs/db': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes a bug that caused an error to be logged about invalid entrypoints
|
|
@ -16,7 +16,7 @@ import {
|
||||||
} from 'vite';
|
} from 'vite';
|
||||||
import parseArgs from 'yargs-parser';
|
import parseArgs from 'yargs-parser';
|
||||||
import { AstroDbError } from '../../runtime/utils.js';
|
import { AstroDbError } from '../../runtime/utils.js';
|
||||||
import { CONFIG_FILE_NAMES, DB_PATH } from '../consts.js';
|
import { CONFIG_FILE_NAMES, DB_PATH, VIRTUAL_MODULE_ID } from '../consts.js';
|
||||||
import { EXEC_DEFAULT_EXPORT_ERROR, EXEC_ERROR } from '../errors.js';
|
import { EXEC_DEFAULT_EXPORT_ERROR, EXEC_ERROR } from '../errors.js';
|
||||||
import { resolveDbConfig } from '../load-file.js';
|
import { resolveDbConfig } from '../load-file.js';
|
||||||
import { SEED_DEV_FILE_NAME } from '../queries.js';
|
import { SEED_DEV_FILE_NAME } from '../queries.js';
|
||||||
|
@ -153,7 +153,7 @@ function astroDBIntegration(): AstroIntegration {
|
||||||
);
|
);
|
||||||
// Eager load astro:db module on startup
|
// Eager load astro:db module on startup
|
||||||
if (seedFiles.get().length || localSeedPaths.find((path) => existsSync(path))) {
|
if (seedFiles.get().length || localSeedPaths.find((path) => existsSync(path))) {
|
||||||
server.ssrLoadModule(resolved.module).catch((e) => {
|
server.ssrLoadModule(VIRTUAL_MODULE_ID).catch((e) => {
|
||||||
logger.error(e instanceof Error ? e.message : String(e));
|
logger.error(e instanceof Error ? e.message : String(e));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue