Refactor Vite config and add necessary plugins#439
Conversation
Updated Vite configuration to include plugins and CSS directives.
Clarified comment to avoid performance issues during build.
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
|
||
| export default { | ||
| plugins: [ | ||
| plugins: { |
There was a problem hiding this comment.
Aren't plugins are supposed to be an array in the postcss config?
There was a problem hiding this comment.
I guess it support both format.
| ## TanStack Start | ||
|
|
||
| If you plan to use TanStack Start, you will need to adjust your vite config with the `ssr` options |
There was a problem hiding this comment.
Can this be generalized? Presumably the Vite ssr config is not just for TanStack
There was a problem hiding this comment.
Sure it can, I can ajust like that
| ## 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 |
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).