Report hasn't been filed before.
What version of drizzle-orm are you using?
1.0.0-beta.15
What version of drizzle-kit are you using?
1.0.0-beta.15
Other packages
drizzle-kit@1.0.0-beta.13
Describe the Bug
What is the undesired behavior?
The new way to load modules (with jiti) introduced in drizzle@1.0.0-beta.13 fails to resolve path aliases defined in tsconfig.json
What are the steps to reproduce it
src
├── entities
│ ├── profile
│ │ └── schema.ts
│ ├── user
│ │ └── schema.ts
drizzle.config.ts
tsconfig.json
//tsconfig.json
{
"compilerOptions": {
"paths": {
"@/*": ["./src/*"]
}
}
}
//drizzle.config.ts
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
schema: ['./src/**/schema.ts'],
//...
});
//src/entites/profile/schema.ts
import { pgTable } from 'drizzle-orm/pg-core';
export const profile = pgTable('profile', (t) => ({
id: t.integer().primaryKey().generatedAlwaysAsIdentity()
}));
//src/entites/user/schema.ts
import { pgTable } from "drizzle-orm/pg-core";
import { profile } from "@/entities/profile/schema"; // this import fails
export const user = pgTable(
'user',
(t) => ({
id: t.integer().primaryKey().generatedAlwaysAsIdentity(),
profileId: t
.integer()
.unique()
.references(() => profile.id)
.notNull()
})
);
drizzle-kit@1.0.0-beta.13+ fails with the folowing error :
> drizzle-kit push
Error Cannot find module '@/entities/profile/schema'
Require stack:
- /home/damaafer/Workspace/tests/drizzle-kit-bug/src/entities/user/schema.ts
drizzle-kit@1.0.0-beta.12 works fine.
Report hasn't been filed before.
What version of
drizzle-ormare you using?1.0.0-beta.15
What version of
drizzle-kitare you using?1.0.0-beta.15
Other packages
drizzle-kit@1.0.0-beta.13
Describe the Bug
What is the undesired behavior?
The new way to load modules (with jiti) introduced in drizzle@1.0.0-beta.13 fails to resolve path aliases defined in tsconfig.json
What are the steps to reproduce it
drizzle-kit@1.0.0-beta.13+ fails with the folowing error :
drizzle-kit@1.0.0-beta.12 works fine.