Set up dynamic deployment targets #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The deployment target can now be dynamically configured via environment variables.
.env.examplefile was updated to includeVITE_DEPLOYMENT_TARGET, allowing users to specify their desired deployment platform (e.g.,netlify,vercel,cloudflare-pages,node-server,bun).vite.config.tswas modified to dynamically read theVITE_DEPLOYMENT_TARGETenvironment variable usingloadEnvand pass it as thetargetoption to thetanstackStartplugin. This enables the build process to adapt to the chosen deployment environment.src/types/deployment.ts, was created to centralize theDeploymentTargettype and anisValidDeploymentTargetutility function. This improves type safety, code organization, and reusability across the codebase.DEPLOYMENT.mdguide was added, detailing platform-specific instructions, required dependencies (e.g.,unenvfor Cloudflare Pages), and configuration files (e.g.,app.config.ts,wrangler.toml) for each deployment target.README.mdwas updated to reference the newDEPLOYMENT.mdfile, providing clear guidance for users.This setup allows users to easily switch deployment targets by modifying an environment variable, with platform-specific details documented separately.