Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Content]: Vinxi app.config.ts needs to be configured for Cloudflare deployment #930

Open
MengLinMaker opened this issue Oct 21, 2024 · 3 comments
Assignees
Labels
pending review Awaiting review by team members.

Comments

@MengLinMaker
Copy link

📚 Subject area/topic

Cloudflare deployment

📋 Page(s) affected (or suggested, for new content)

/guides/deployment-options/cloudflare.mdx

📋 Description of content that is out-of-date or incorrect

  1. Vinxi app.config.ts needs to be configured to bundle for cloudflare:
server: {
    preset: 'cloudflare-pages',
    sourceMap: 'inline',
}

This will generate Cloudflare bundle in dist folder.
Serve the Cloudflare bundle locally with npx wrangler pages dev dist --port 3000

Note: source map is enabled to generate stack trace for runtime errors. This is useful for debugging compatibility issues between cloudflare/workerd and node. You can disable sourceMap to reduce deployment size at the cost of gibberish errors.

🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)

No response

@MengLinMaker MengLinMaker added the pending review Awaiting review by team members. label Oct 21, 2024
@brenelz
Copy link
Collaborator

brenelz commented Nov 24, 2024

Is configuring cloudflare deployment any different than others. Like setting the preset feels likes its documented

@MengLinMaker
Copy link
Author

MengLinMaker commented Nov 24, 2024

Is configuring cloudflare deployment any different than others. Like setting the preset feels likes its documented

This was not obvious in Solid docs. Had to search through Solidjs Discord. Found nothing useful in Vinxi docs.

Nitro docs pretty much explained what configuration to use.

I think it would be helpful to reference the Nitro docs at least. This was the most useful resource for figuring how to deploy to Cloudflare

@MengLinMaker
Copy link
Author

MengLinMaker commented Nov 24, 2024

@brenelz If you search "deploy cloudflare" in Solidjs Discord, you may find the same "how to deploy to cloudflare" question repeating over and over again.

I certainly did not find the docs sufficient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending review Awaiting review by team members.
Projects
None yet
Development

No branches or pull requests

3 participants