-
Notifications
You must be signed in to change notification settings - Fork 80
Description
A user pointed out that the developer experience for customizing Vite configurations can be confusing. Some settings are controlled by the framework, while others follow Vite's defaults. This can make it unclear what is safe or effective to customize.
This ticket proposes a plan to improve this experience:
-
Refactor to Overridable Defaults: Move framework-controlled Vite settings into a base configuration that users can override. The default behavior will remain the same, but the mechanism will be more transparent and flexible.
-
Establish Clear Guardrails: The build process for the and environments has strict requirements due to the multi-pass linking, RSC, and Cloudflare-specific transforms. We need to:
- Document which configuration areas are "owned" by the framework and should not be modified (e.g., and , , etc.).
- Implement warnings that log to the console if a user's attempts to override a protected setting in these environments.
-
Improve Documentation: Create a dedicated documentation page that explains:
- The framework's default Vite configuration.
- The recommended way to customize the build.
- A clear list of the established guardrails and why they exist.
The goal is to provide users with safe, predictable control over the parts of the build that are meant to be customized, while protecting the integrity of the complex RSC/Cloudflare build orchestration.