Skip to content

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

Open
@MengLinMaker

Description

@MengLinMaker

📚 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

Metadata

Metadata

Assignees

Labels

plannedFeatures or content that are planned but not yet in progress.solidRelated to core Solid

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions