Skip to content

Clarify VITE_BASE environment variable behavior for Cloudflare deployment#176

Closed
Copilot wants to merge 1 commit intoLittleLittleCloud-patch-1from
copilot/sub-pr-175
Closed

Clarify VITE_BASE environment variable behavior for Cloudflare deployment#176
Copilot wants to merge 1 commit intoLittleLittleCloud-patch-1from
copilot/sub-pr-175

Conversation

Copy link
Contributor

Copilot AI commented Nov 23, 2025

Addressed question about using an empty string vs / for VITE_BASE in Cloudflare Pages deployment.

Analysis

Empty string ("") and / produce different asset path types:

  • Empty string → relative paths (./assets/file.js)
  • / → absolute paths (/assets/file.js)

Both work for Cloudflare Pages (root domain deployment), but empty string is more portable:

  • Works in any deployment context (root, subpath, local filesystem)
  • Downloaded artifacts are immediately usable without path configuration
  • No assumptions about deployment root

Recommendation

Use VITE_BASE: "" for the preview workflow since it deploys to Cloudflare Pages and maximizes artifact portability for users downloading previews.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Nov 23, 2025
Copilot AI changed the title [WIP] Update VITE_BASE environment variable for deployment Clarify VITE_BASE environment variable behavior for Cloudflare deployment Nov 23, 2025
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.

2 participants