Place relations into seperate file?

When I put relations into it's own file such as relations.ts and also have schema.ts and then do...
import * as relations from '$lib/db/relations.js';
import * as schema from '$lib/db/schema.js';

export const db = drizzle({
...
schema: { ...schema, ...relations }
});
import * as relations from '$lib/db/relations.js';
import * as schema from '$lib/db/schema.js';

export const db = drizzle({
...
schema: { ...schema, ...relations }
});
it seems to be give me type issues
1 Reply
rphlmr ⚡
rphlmr ⚡2d ago
Looks like you import “.js” files here. Is it expected?

Did you find this page helpful?