@@ -19,7 +19,23 @@ export default defineConfig(({ mode }) => {
1919 "@calcom/platform-utils" ,
2020 ] ,
2121 } ,
22- plugins : [ react ( ) , dts ( { insertTypesEntry : true } ) ] ,
22+ plugins : [
23+ react ( ) ,
24+ dts ( {
25+ insertTypesEntry : true ,
26+ beforeWriteFile : ( filePath , content ) => {
27+ // Check if the content includes the broken path from kysely
28+ if ( content . includes ( `kysely/types.ts').$Enums` ) ) {
29+ // Replace the broken path with the correct import
30+ return {
31+ filePath,
32+ content : content . replaceAll ( `kysely/types.ts').$Enums` , `kysely/types.ts')` ) ,
33+ } ;
34+ }
35+ return { filePath, content } ;
36+ } ,
37+ } ) ,
38+ ] ,
2339 define : {
2440 "process.env.NEXT_PUBLIC_WEBAPP_URL" : `"${ webAppUrl } "` ,
2541 } ,
@@ -34,7 +50,16 @@ export default defineConfig(({ mode }) => {
3450 formats : [ "es" ] ,
3551 } ,
3652 rollupOptions : {
37- external : [ "react" , "fs" , "path" , "os" , "react/jsx-runtime" , "react-dom" , "react-dom/client" ] ,
53+ external : [
54+ "react" ,
55+ "fs" ,
56+ "path" ,
57+ "os" ,
58+ "react/jsx-runtime" ,
59+ "react-dom" ,
60+ "react-dom/client" ,
61+ "@prisma/client" ,
62+ ] ,
3863 output : {
3964 format : "esm" ,
4065 globals : {
@@ -54,10 +79,9 @@ export default defineConfig(({ mode }) => {
5479 "@calcom/lib/hooks/useLocale" : path . resolve ( __dirname , "./lib/useLocale" ) ,
5580 "@radix-ui/react-tooltip" : path . resolve ( __dirname , "./src/components/ui/tooltip.tsx" ) ,
5681 "@radix-ui/react-dialog" : path . resolve ( __dirname , "./src/components/ui/dialog.tsx" ) ,
57- ".prisma/client" : path . resolve ( __dirname , "../../prisma-client" ) ,
58- "@prisma/client" : path . resolve ( __dirname , "../../prisma-client" ) ,
59- "@calcom/prisma/client" : path . resolve ( __dirname , "../../prisma-client" ) ,
60- "@calcom/prisma" : path . resolve ( __dirname , "../../prisma" ) ,
82+ "@calcom/prisma/client/runtime/library" : resolve ( "./prisma-types/index.ts" ) ,
83+ "@calcom/prisma/client" : path . resolve ( __dirname , "../../kysely/types.ts" ) ,
84+ kysely : path . resolve ( __dirname , "./kysely-types/index.ts" ) ,
6185 "@calcom/dayjs" : path . resolve ( __dirname , "../../dayjs" ) ,
6286 "@calcom/platform-constants" : path . resolve ( __dirname , "../constants/index.ts" ) ,
6387 "@calcom/platform-types" : path . resolve ( __dirname , "../types/index.ts" ) ,
0 commit comments