Skip to content

fix: use correct publish key in netlify.toml instead of dir#424

Open
muhammedogz wants to merge 1 commit intoTanStack:mainfrom
muhammedogz:fix/netlify-toml-publish-key
Open

fix: use correct publish key in netlify.toml instead of dir#424
muhammedogz wants to merge 1 commit intoTanStack:mainfrom
muhammedogz:fix/netlify-toml-publish-key

Conversation

@muhammedogz
Copy link
Copy Markdown

@muhammedogz muhammedogz commented Apr 4, 2026

The generated netlify.toml files used dir under [build], which is not a valid Netlify configuration key. Changed it to publish as documented in the official Netlify TanStack Start guide (https://docs.netlify.com/build/frameworks/framework-setup-guides/tanstack-start/).

Closes #423

Summary by CodeRabbit

  • Chores
    • Updated Netlify build configuration for both React and Solid framework templates. Refined how the output directory is specified during the build process, ensuring Netlify correctly identifies and publishes the built site from the proper location. This applies to all new projects created with these templates.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8de35a8d-e604-4019-81bb-d2b374645f5b

📥 Commits

Reviewing files that changed from the base of the PR and between 4cd8184 and eebb702.

📒 Files selected for processing (2)
  • packages/create/src/frameworks/react/hosts/netlify/assets/netlify.toml
  • packages/create/src/frameworks/solid/hosts/netlify/assets/netlify.toml

📝 Walkthrough

Walkthrough

Fixed invalid Netlify configuration in both React and Solid framework templates by replacing the non-standard dir key with the correct publish key in the [build] section of netlify.toml files.

Changes

Cohort / File(s) Summary
Netlify Configuration Fix
packages/create/src/frameworks/react/hosts/netlify/assets/netlify.toml, packages/create/src/frameworks/solid/hosts/netlify/assets/netlify.toml
Replaced invalid dir = "dist/client" with correct publish = "dist/client" in the [build] section to comply with official Netlify configuration specifications.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A config that's true, now shines so bright,
"publish" not "dir"—the Netlify way is right!
Two frameworks rejoice, their syntax aligned,
No more invalid keys left behind!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: replacing the invalid 'dir' key with the correct 'publish' key in netlify.toml files.
Linked Issues check ✅ Passed The PR fully addresses issue #423 by correcting both the React and Solid netlify.toml files to use the 'publish' key instead of the invalid 'dir' key, matching official Netlify documentation.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the netlify.toml configuration files for React and Solid frameworks as required by the linked issue, with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Netlify TOML uses invalid dir key instead of publish

1 participant