From 749dab7f6875715b1b98c97a7875b9b573591bcc Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Wed, 13 Mar 2024 15:00:42 +0000 Subject: [PATCH 1/2] Add paths to builder tsconfig --- packages/builder/tsconfig.json | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/builder/tsconfig.json b/packages/builder/tsconfig.json index b2084dba65..7c9b35bff5 100644 --- a/packages/builder/tsconfig.json +++ b/packages/builder/tsconfig.json @@ -4,6 +4,22 @@ "composite": true, "declaration": true, "sourceMap": true, - "baseUrl": "." + "baseUrl": ".", + "paths": { + "assets/*": ["./assets/*"], + "components/*": ["./src/components/*"], + "pages/*": ["./src/pages/*"], + "templates": ["./src/templates"], + "templates/*": ["./src/templates/*"], + "stores/*": ["./src/stores/*"], + "dataBinding": ["./src/dataBinding.js"], + "api": ["./src/api.js"], + "constants": ["./src/constants"], + "constants/*": ["./src/constants/*"], + "analytics": ["./src/analytics"], + "actions": ["./src/actions"], + "helpers": ["./src/helpers"], + "helpers/*": ["./src/helpers/*"] + } } } From 07234a1c58f121d0614b06822e5348ffbdb5bf67 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 19 Mar 2024 09:49:44 +0000 Subject: [PATCH 2/2] Make paths more generic and add paths for @budibase imports --- packages/builder/tsconfig.json | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/packages/builder/tsconfig.json b/packages/builder/tsconfig.json index 7c9b35bff5..be79dfd85c 100644 --- a/packages/builder/tsconfig.json +++ b/packages/builder/tsconfig.json @@ -7,19 +7,13 @@ "baseUrl": ".", "paths": { "assets/*": ["./assets/*"], - "components/*": ["./src/components/*"], - "pages/*": ["./src/pages/*"], - "templates": ["./src/templates"], - "templates/*": ["./src/templates/*"], - "stores/*": ["./src/stores/*"], - "dataBinding": ["./src/dataBinding.js"], - "api": ["./src/api.js"], - "constants": ["./src/constants"], - "constants/*": ["./src/constants/*"], - "analytics": ["./src/analytics"], - "actions": ["./src/actions"], - "helpers": ["./src/helpers"], - "helpers/*": ["./src/helpers/*"] + "@budibase/*": [ + "../*/src/index.ts", + "../*/src/index.js", + "../*", + "../../node_modules/@budibase/*" + ], + "*": ["./src/*"] } } }