Skip to content

Commit 2772c28

Browse files
committed
chore: set output for projects
1 parent afb5d9a commit 2772c28

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ All parts of the project live inside this monorepo.
2828
- [`backend`](./apps/backend/)
2929
- [`frontend`](./apps/frontend/)
3030
- [`mockup`](./apps/mockup/)
31-
- Packages
32-
- [`ui`](./packages/ui/): Common UI components are represented inside this package.
31+
- Libs
32+
- [`ui`](./libs/ui/): Common UI components are represented inside this package.
33+
34+
Projects need be configured to output into the workspace `dist` folder.

apps/backend/tsconfig.build.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
3-
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
3+
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"],
4+
"compilerOptions": {
5+
"outDir": "../../dist/apps/backend"
6+
}
47
}

apps/frontend/vite.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ export default defineConfig({
66
server: {
77
port: 3001
88
},
9+
build: {
10+
outDir: "../../dist/apps/frontend",
11+
},
912
clearScreen: false,
1013
plugins: [react()],
1114
})
File renamed without changes.

nx.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"$schema": "./node_modules/nx/schemas/nx-schema.json",
33
"defaultBase": "main",
4+
"workspaceLayout": {
5+
"appsDir": "apps",
6+
"libsDir": "libs"
7+
},
48
"targetDefaults": {
59
"build": {
610
"dependsOn": ["^build"],

0 commit comments

Comments
 (0)