Skip to content

Commit

Permalink
chore: set output for projects
Browse files Browse the repository at this point in the history
  • Loading branch information
openscript committed Sep 24, 2024
1 parent afb5d9a commit 2772c28
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,7 @@ All parts of the project live inside this monorepo.
- [`backend`](./apps/backend/)
- [`frontend`](./apps/frontend/)
- [`mockup`](./apps/mockup/)
- Packages
- [`ui`](./packages/ui/): Common UI components are represented inside this package.
- Libs
- [`ui`](./libs/ui/): Common UI components are represented inside this package.

Projects need be configured to output into the workspace `dist` folder.
5 changes: 4 additions & 1 deletion apps/backend/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": "./tsconfig.json",
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"]
"exclude": ["node_modules", "test", "dist", "**/*spec.ts"],
"compilerOptions": {
"outDir": "../../dist/apps/backend"
}
}
3 changes: 3 additions & 0 deletions apps/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ export default defineConfig({
server: {
port: 3001
},
build: {
outDir: "../../dist/apps/frontend",
},
clearScreen: false,
plugins: [react()],
})
File renamed without changes.
4 changes: 4 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"defaultBase": "main",
"workspaceLayout": {
"appsDir": "apps",
"libsDir": "libs"
},
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
Expand Down

0 comments on commit 2772c28

Please sign in to comment.