mirror of
https://github.com/withastro/astro.git
synced 2025-03-31 23:31:30 -05:00
style: rejiggle
This commit is contained in:
parent
0ca265efe2
commit
985d3a0ec0
1 changed files with 4 additions and 8 deletions
|
@ -112,13 +112,9 @@ export function getLocalVirtualModContents({
|
|||
const integrationSeedFilePaths = seedFiles.map((pathOrUrl) =>
|
||||
typeof pathOrUrl === 'string' ? resolveId(pathOrUrl) : pathOrUrl.pathname
|
||||
);
|
||||
const integrationSeedImports =
|
||||
'[' +
|
||||
integrationSeedFilePaths
|
||||
.map((filePath) => `() => import(${JSON.stringify(filePath)})`)
|
||||
.join(',') +
|
||||
']';
|
||||
|
||||
const integrationSeedImports = integrationSeedFilePaths.map(
|
||||
(filePath) => `() => import(${JSON.stringify(filePath)})`
|
||||
);
|
||||
return `
|
||||
import { asDrizzleTable, seedLocal } from ${RUNTIME_IMPORT};
|
||||
import { db as _db } from ${JSON.stringify(LOCAL_DB_VIRTUAL_MODULE_ID)};
|
||||
|
@ -131,7 +127,7 @@ ${
|
|||
db: _db,
|
||||
tables: ${JSON.stringify(tables)},
|
||||
userSeedGlob: import.meta.glob(${JSON.stringify(userSeedFilePaths)}),
|
||||
integrationSeedImports: ${integrationSeedImports},
|
||||
integrationSeedImports: [${integrationSeedImports.join(',')}],
|
||||
});`
|
||||
: ''
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue