Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
Use TS project references to improve the IDE experience
Mateusz Burzyński59ff5bf4d8ae
diff --git a/.gitignore b/.gitignoreindex 04b912530e..7730c73eb7 100644--- a/.gitignore+++ b/.gitignore@@ -49,3 +49,4 @@ yarn-error.log*packages/**/libgeneratedstorybook-static+tsconfig.tsbuildinfodiff --git a/apps/designer/package.json b/apps/designer/package.jsonindex f185e72f29..9ad3d8c290 100644--- a/apps/designer/package.json+++ b/apps/designer/package.json@@ -25,12 +25,12 @@"@sentry/remix": "^7.5.0","@vercel/node": "^2.4.1","@webstudio-is/asset-uploader": "*",+ "@webstudio-is/css-vars": "*","@webstudio-is/design-system": "*","@webstudio-is/icons": "*","@webstudio-is/prisma-client": "*",- "@webstudio-is/react-sdk": "*",- "@webstudio-is/css-vars": "*","@webstudio-is/project": "*",+ "@webstudio-is/react-sdk": "*","bson-objectid": "^2.0.2","camelcase": "^6.3.0","debug": "^4.3.4",diff --git a/apps/designer/tsconfig.json b/apps/designer/tsconfig.jsonindex 4ce92c95f5..13305a7d34 100644--- a/apps/designer/tsconfig.json+++ b/apps/designer/tsconfig.json@@ -2,9 +2,20 @@"extends": "../../node_modules/@webstudio-is/tsconfig/remix.json","include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],"compilerOptions": {+ "composite": true,"paths": {"~/*": ["app/*"]},- "baseUrl": "."- }+ "baseUrl": ".",+ "rootDir": "./app"+ },+ "references": [+ { "path": "../../packages/asset-uploader" },+ { "path": "../../packages/css-vars" },+ { "path": "../../packages/design-system" },+ { "path": "../../packages/icons" },+ { "path": "../../packages/prisma-client" },+ { "path": "../../packages/project" },+ { "path": "../../packages/react-sdk" }+ ]}diff --git a/packages/asset-uploader/tsconfig.json b/packages/asset-uploader/tsconfig.jsonindex 6b67ca9bbf..cf79429cbb 100644--- a/packages/asset-uploader/tsconfig.json+++ b/packages/asset-uploader/tsconfig.json@@ -3,10 +3,13 @@"extends": "../../node_modules/@webstudio-is/tsconfig/base.json","include": ["./src/**/*.ts"],"compilerOptions": {+ "composite": true,"module": "commonjs","target": "ES2020","strict": true,"baseUrl": ".",- "outDir": "./lib"- }+ "outDir": "./lib",+ "rootDir": "./src"+ },+ "references": [{ "path": "../prisma-client" }]}diff --git a/packages/css-vars/tsconfig.json b/packages/css-vars/tsconfig.jsonindex 6b67ca9bbf..c80c86b493 100644--- a/packages/css-vars/tsconfig.json+++ b/packages/css-vars/tsconfig.json@@ -3,10 +3,12 @@"extends": "../../node_modules/@webstudio-is/tsconfig/base.json","include": ["./src/**/*.ts"],"compilerOptions": {+ "composite": true,"module": "commonjs","target": "ES2020","strict": true,"baseUrl": ".",- "outDir": "./lib"+ "outDir": "./lib",+ "rootDir": "./src"}}diff --git a/packages/design-system/tsconfig.json b/packages/design-system/tsconfig.jsonindex eb77362863..445665e079 100644--- a/packages/design-system/tsconfig.json+++ b/packages/design-system/tsconfig.json@@ -3,6 +3,7 @@"extends": "../../node_modules/@webstudio-is/tsconfig/base.json","include": ["./src/**/*.ts", "./src/**/*.tsx"],"compilerOptions": {+ "composite": true,"lib": ["DOM", "DOM.Iterable", "ES2020"],"module": "commonjs","jsx": "react-jsx",@@ -12,6 +13,8 @@"paths": {"~/*": ["./src/*"]},+ "rootDir": "./src","outDir": "./lib"- }+ },+ "references": [{ "path": "../icons" }]}diff --git a/packages/http-client/tsconfig.json b/packages/http-client/tsconfig.jsonindex eb77362863..b02d0cb5f0 100644--- a/packages/http-client/tsconfig.json+++ b/packages/http-client/tsconfig.json@@ -12,6 +12,8 @@"paths": {"~/*": ["./src/*"]},- "outDir": "./lib"- }+ "outDir": "./lib",+ "rootDir": "./src"+ },+ "references": [{ "path": "../prisma-client" }, { "path": "../react-sdk" }]}diff --git a/packages/icons/tsconfig.json b/packages/icons/tsconfig.jsonindex eb77362863..700e9a4d9b 100644--- a/packages/icons/tsconfig.json+++ b/packages/icons/tsconfig.json@@ -3,6 +3,7 @@"extends": "../../node_modules/@webstudio-is/tsconfig/base.json","include": ["./src/**/*.ts", "./src/**/*.tsx"],"compilerOptions": {+ "composite": true,"lib": ["DOM", "DOM.Iterable", "ES2020"],"module": "commonjs","jsx": "react-jsx",@@ -12,6 +13,8 @@"paths": {"~/*": ["./src/*"]},- "outDir": "./lib"- }+ "outDir": "./lib",+ "rootDir": "./src"+ },+ "references": [{ "path": "../css-vars" }]}diff --git a/packages/prisma-client/tsconfig.json b/packages/prisma-client/tsconfig.jsonindex ff828da22f..abde4dd5fd 100644--- a/packages/prisma-client/tsconfig.json+++ b/packages/prisma-client/tsconfig.json@@ -3,9 +3,12 @@"extends": "../../node_modules/@webstudio-is/tsconfig/base.json","include": ["./src/**/*.ts"],"compilerOptions": {+ "composite": true,"module": "commonjs","target": "ES2019","strict": true,- "baseUrl": "."+ "baseUrl": ".",+ "rootDir": "./src",+ "outDir": "./lib"}}diff --git a/packages/project/tsconfig.json b/packages/project/tsconfig.jsonindex 6b67ca9bbf..8dbc32b025 100644--- a/packages/project/tsconfig.json+++ b/packages/project/tsconfig.json@@ -3,10 +3,17 @@"extends": "../../node_modules/@webstudio-is/tsconfig/base.json","include": ["./src/**/*.ts"],"compilerOptions": {+ "composite": true,"module": "commonjs","target": "ES2020","strict": true,"baseUrl": ".",- "outDir": "./lib"- }+ "outDir": "./lib",+ "rootDir": "./src"+ },+ "references": [+ { "path": "../asset-uploader" },+ { "path": "../prisma-client" },+ { "path": "../react-sdk" }+ ]}diff --git a/packages/react-sdk/tsconfig.json b/packages/react-sdk/tsconfig.jsonindex eb77362863..5bd5a2b4c4 100644--- a/packages/react-sdk/tsconfig.json+++ b/packages/react-sdk/tsconfig.json@@ -1,8 +1,9 @@// Extends can't use node's resolution rn https://github.com/dividab/tsconfig-paths/issues/209#issuecomment-1177261091{"extends": "../../node_modules/@webstudio-is/tsconfig/base.json",- "include": ["./src/**/*.ts", "./src/**/*.tsx"],+ "include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.json"],"compilerOptions": {+ "composite": true,"lib": ["DOM", "DOM.Iterable", "ES2020"],"module": "commonjs","jsx": "react-jsx",@@ -12,6 +13,8 @@"paths": {"~/*": ["./src/*"]},- "outDir": "./lib"- }+ "outDir": "./lib",+ "rootDir": "./src"+ },+ "references": [{ "path": "../icons" }, { "path": "../prisma-client" }]}diff --git a/tsconfig.json b/tsconfig.jsonnew file mode 100644index 0000000000..e8b9dc3435--- /dev/null+++ b/tsconfig.json@@ -0,0 +1,14 @@+{+ "files": [],+ "references": [+ { "path": "./apps/designer" },+ { "path": "./packages/asset-uploader" },+ { "path": "./packages/css-vars" },+ { "path": "./packages/design-system" },+ { "path": "./packages/http-client" },+ { "path": "./packages/icons" },+ { "path": "./packages/prisma-client" },+ { "path": "./packages/project" },+ { "path": "./packages/react-sdk" }+ ]+}