Skip to content

Refactor Vite config and add necessary plugins#439

Closed
MoOx wants to merge 4 commits into
react:mainfrom
MoOx:patch-4
Closed

Refactor Vite config and add necessary plugins#439
MoOx wants to merge 4 commits into
react:mainfrom
MoOx:patch-4

Conversation

@MoOx

@MoOx MoOx commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Updated Vite configuration to include plugins and CSS directives.

I also fixed Next JS postcss docs that had the same syntax error and also added the note about postcss glob in expo docs so all docs are similar.
You mind find this dumb, but I recently just used "**/*.{js,jsx,ts,tsx}" since my app doesn't have a big "src" folder and I have multiple folders at the root (like 6 - and I am lazy) and this created a performance delay I didn't detected first, but hot reload was taking like 6s and I had a hard time to identify this issue (I used vite --profile and found that postcss was the culprit and identified the cause right after that).

Updated Vite configuration to include plugins and CSS directives.
Copilot AI review requested due to automatic review settings December 16, 2025 09:33
@MoOx MoOx requested a review from necolas as a code owner December 16, 2025 09:33
@meta-cla meta-cla Bot added the cla signed label Dec 16, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the PostCSS configuration syntax and enhances documentation across multiple environment setup guides. The changes correct the PostCSS plugin configuration to use the object syntax (matching the actual implementation in the example apps) and add helpful context for developers.

  • Updates PostCSS plugin configuration from array to object syntax in Vite and Next.js documentation
  • Adds performance guidance comment warning against overly broad glob patterns
  • Includes new installation instructions and TanStack Start configuration section for Vite

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
packages/website/docs/learn/environment-setup/03-vite.md Refactored PostCSS config to object syntax, added Vite plugin installation instructions, clarified CSS file path, reordered imports, and added TanStack Start SSR configuration section
packages/website/docs/learn/environment-setup/02-next.md Updated PostCSS config to object syntax and added performance warning comment to match other files
packages/website/docs/learn/environment-setup/01-expo.md Added performance warning comment about glob patterns to maintain consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/website/docs/learn/environment-setup/02-next.md Outdated
Comment thread packages/website/docs/learn/environment-setup/01-expo.md Outdated
Comment thread packages/website/docs/learn/environment-setup/03-vite.md Outdated
Comment thread packages/website/docs/learn/environment-setup/03-vite.md Outdated
Comment thread packages/website/docs/learn/environment-setup/03-vite.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

export default {
plugins: [
plugins: {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't plugins are supposed to be an array in the postcss config?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it support both format.

Comment on lines +148 to +150
## TanStack Start

If you plan to use TanStack Start, you will need to adjust your vite config with the `ssr` options

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be generalized? Presumably the Vite ssr config is not just for TanStack

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure it can, I can ajust like that

Suggested change
## TanStack Start
If you plan to use TanStack Start, you will need to adjust your vite config with the `ssr` options
## Server-Side Rendering
If you are using SSR with Vite (eg: using **TanStack Start**), you will need to adjust your vite config with the `ssr` options

@necolas necolas closed this in a5cbf07 Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants