Skip to content

Commit

Permalink
Fix: BlitzCliConfig does not work when blitz-server.ts is in /src/app…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
siddhsuresh committed Jan 16, 2024
1 parent 2f5c8a3 commit 47722e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/giant-knives-wonder.md
@@ -0,0 +1,5 @@
---
"@blitzjs/generator": patch
---

Fix: search inside any subdirectory to inside `src|app` directories to find `blitz-server.ts` to use the `BlitzCliConfig` configurations.
2 changes: 1 addition & 1 deletion packages/generator/src/generator.ts
Expand Up @@ -35,7 +35,7 @@ export const customTemplatesBlitzConfig = async (
codemod = false,
) => {
const {globby} = await import("globby")
const blitzServer = await globby(["{app,src}/**/blitz-server.{ts,js}"], {
const blitzServer = await globby(["{app,src}/**/**/blitz-server.{ts,js}"], {
cwd: getProjectRootSync(),
})
if (blitzServer.length === 0) {
Expand Down

0 comments on commit 47722e0

Please sign in to comment.