Skip to content

The open alternative to Salesforce, designed for AI.

Fix tsconfigpaths root (#15683)

Paul Rastoin137aba049d7e
diff --git a/packages/twenty-emails/vite.config.ts b/packages/twenty-emails/vite.config.ts
index 5f0f5f4c498..e4b3bb6715a 100644
--- a/packages/twenty-emails/vite.config.ts
+++ b/packages/twenty-emails/vite.config.ts
@@ -1,10 +1,10 @@
import { lingui } from '@lingui/vite-plugin';
import react from '@vitejs/plugin-react-swc';
import * as path from 'path';
+import { APP_LOCALES } from 'twenty-shared/translations';
import { defineConfig } from 'vite';
import dts from 'vite-plugin-dts';
import tsconfigPaths from 'vite-tsconfig-paths';
-import { APP_LOCALES } from 'twenty-shared/translations';
export default defineConfig({
root: __dirname,
@@ -17,7 +17,9 @@ export default defineConfig({
lingui({
configPath: path.resolve(__dirname, './lingui.config.ts'),
}),
- tsconfigPaths(),
+ tsconfigPaths({
+ root: __dirname
+ }),
dts({
entryRoot: 'src',
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
diff --git a/packages/twenty-front/vite.config.ts b/packages/twenty-front/vite.config.ts
index e240e339c17..dbde1d1ce97 100644
--- a/packages/twenty-front/vite.config.ts
+++ b/packages/twenty-front/vite.config.ts
@@ -112,6 +112,7 @@ export default defineConfig(({ command, mode }) => {
plugins: [['@lingui/swc-plugin', {}]],
}),
tsconfigPaths({
+ root: __dirname,
projects: ['tsconfig.json'],
}),
svgr(),
diff --git a/packages/twenty-shared/vite.config.ts b/packages/twenty-shared/vite.config.ts
index 949577bec3c..1e7983943fe 100644
--- a/packages/twenty-shared/vite.config.ts
+++ b/packages/twenty-shared/vite.config.ts
@@ -42,8 +42,10 @@ export default defineConfig(() => {
root: __dirname,
cacheDir: '../../node_modules/.vite/packages/twenty-shared',
plugins: [
- tsconfigPaths(),
- dts({ entryRoot: 'src', tsconfigPath: tsConfigPath }),
+ tsconfigPaths({
+ root: __dirname
+ }),
+ dts({ entryRoot: './src', tsconfigPath: tsConfigPath }),
],
build: {
outDir: 'dist',
diff --git a/packages/twenty-ui/vite.config.ts b/packages/twenty-ui/vite.config.ts
index 7cfd3b6a318..1f309b71af6 100644
--- a/packages/twenty-ui/vite.config.ts
+++ b/packages/twenty-ui/vite.config.ts
@@ -72,6 +72,7 @@ export default defineConfig(({ command }) => {
plugins: [['@swc/plugin-emotion', {}]],
}),
tsconfigPaths({
+ root: __dirname,
projects: ['tsconfig.json'],
}),
svgr(),