Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/create-rstack/template-nx/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Let Rstack load environment files for the current command.
NX_LOAD_DOT_ENV_FILES=false
2 changes: 2 additions & 0 deletions packages/create-rstack/template-nx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Run from the repository root:

Nx discovers projects and tasks from workspace package manifests. Build and test tasks are cached, and dependencies are built first.

The root `.env` disables Nx's environment-file loading so Rstack can load each project's environment files with the correct mode and priority.

Run `pnpm run build` before `pnpm run check`.

Use `pnpm exec nx graph` to explore the project graph.
Expand Down
3 changes: 3 additions & 0 deletions packages/create-rstack/tests/create.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,9 @@ test.each(['turborepo', 'nx'])(
'apps/web/src/index.tsx',
'packages/ui/src/button.tsx',
]);
if (template === 'nx') {
await expectFiles(projectDirectory, ['.env', 'tsconfig.base.json']);
}
},
);

Expand Down
Loading