Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
fix(nuxt): drizzle seed file import path
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed Dec 22, 2023
1 parent 45d7bf4 commit 1ea58e4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default {
}

if (!existsSync(resolve(nuxt._pergel._module.options.seedPaths, 'seeds', 'seed1.ts'))) {
const readFile = await import('./seed/seed1').then(m => m.default).catch(() => null)
const readFile = await import('./seed/s-seed1').then(m => m.default).catch(() => null)
if (readFile) {
const file = readFile()
writeFileSync(resolve(nuxt._pergel._module.options.seedPaths, 'seed1.ts'), file)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function (data: {
}
migrationDir: string
}) {
return /* TS */ `import { resolve } from 'node:path'
return `import { resolve } from 'node:path'
import { sql } from 'drizzle-orm'
import { migrate } from 'drizzle-orm/postgres-js/migrator'
import { drizzle } from 'drizzle-orm/postgres-js'
Expand Down

0 comments on commit 1ea58e4

Please sign in to comment.