Skip to content

Commit 4cae862

Browse files
committed
v0fix: fixed drizzle import issue
1 parent 066dd73 commit 4cae862

File tree

4 files changed

+35
-49
lines changed

4 files changed

+35
-49
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ export default defineNuxtConfig({
3636
Use the included drizzle config if you want, it will ensure you define the right variables:
3737

3838
```ts [drizzleConfig.ts]
39-
import { drizzleConfig } from "@witchcraft/nuxt-postgres/drizzleConfig"
39+
//@ts-expect-error careful with imports, esm is borked, see nuxt-postgres/src/drizzleConfig.ts
40+
import { drizzleConfig } from "@witchcraft/nuxt-postgres/drizzleConfig.js"
4041
import { ensureEnv } from "@witchcraft/nuxt-utils/utils/ensureEnv"
4142
import { defineConfig } from "drizzle-kit"
4243
import path from "path"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"./*": {
1818
"types": "./dist/runtime/*.d.ts",
1919
"import": "./dist/runtime/*.js",
20-
"require": "./dist/runtime/*.ts"
20+
"require": "./dist/runtime/*.js"
2121
}
2222
},
2323
"files": [

playground/drizzle.config.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { drizzleConfig } from "@witchcraft/nuxt-postgres/drizzleConfig"
2+
import { defineConfig } from "drizzle-kit"
3+
import path from "node:path"
4+
5+
6+
export default defineConfig({
7+
...drizzleConfig,
8+
schema: path.resolve("db/schema.ts"),
9+
out: "./db/migrations"
10+
})
11+

playground/pnpm-lock.yaml

Lines changed: 21 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)