Skip to content

Commit

Permalink
fix: correct theme provider path construction in Next.js setup
Browse files Browse the repository at this point in the history
Fixed path joining for theme provider and providers stub files to properly
include language subfolder (ts/js) in the path structure. This resolves the
ENOENT error when initializing Next.js projects.
  • Loading branch information
hiphucto committed Jan 19, 2025
1 parent 55c7e67 commit 7173fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ export async function init(flags: {
providers = path.join(stubs, `next/${lang}/providers.stub`)
} else if (isNextJs() && !hasFolder("src")) {
twConfigStub = path.join(stubs, "1.x/tailwind.config.next.stub")
themeProvider = path.join(stubs, `next/${lang}theme-provider.stub`)
providers = path.join(stubs, `next/${lang}providers.stub`)
themeProvider = path.join(stubs, `next/${lang}/theme-provider.stub`)
providers = path.join(stubs, `next/${lang}/providers.stub`)
} else if (isLaravel()) {
twConfigStub = path.join(stubs, "1.x/tailwind.config.laravel.stub")
themeProvider = path.join(stubs, `laravel/${lang}theme-provider.stub`)
Expand Down

0 comments on commit 7173fd4

Please sign in to comment.