Skip to content

Commit 47722e0

Browse files
authored
Fix: BlitzCliConfig does not work when blitz-server.ts is in /src/app directory (#4279)
* fix: search any subdirectly in `app/src` to find `blitz-server.ts` * Create giant-knives-wonder.md * Update packages/generator/src/generator.ts
1 parent 2f5c8a3 commit 47722e0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/giant-knives-wonder.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@blitzjs/generator": patch
3+
---
4+
5+
Fix: search inside any subdirectory to inside `src|app` directories to find `blitz-server.ts` to use the `BlitzCliConfig` configurations.

packages/generator/src/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const customTemplatesBlitzConfig = async (
3535
codemod = false,
3636
) => {
3737
const {globby} = await import("globby")
38-
const blitzServer = await globby(["{app,src}/**/blitz-server.{ts,js}"], {
38+
const blitzServer = await globby(["{app,src}/**/**/blitz-server.{ts,js}"], {
3939
cwd: getProjectRootSync(),
4040
})
4141
if (blitzServer.length === 0) {

0 commit comments

Comments
 (0)