Skip to content

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

Open

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

Activity

  1. brenelz commented on Nov 24, 2024

    @brenelz
    Collaborator

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

  2. MengLinMaker commented on Nov 24, 2024

    @MengLinMaker
    Author

    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

  3. MengLinMaker commented on Nov 24, 2024

    @MengLinMaker
    Author

    @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

  4. added
    help wantedLooking for assistance on this issue
    and removed
    pending reviewAwaiting review by team members.
    on Mar 8, 2025
  5. removed their assignment
    on Mar 8, 2025
  6. LadyBluenotes commented on Mar 8, 2025

    @LadyBluenotes
    Member

    @amirhhashemi do you mind reviewing this issue and proposing a solution?

  7. amirhhashemi commented on Mar 8, 2025

    @amirhhashemi
    Collaborator

    @LadyBluenotes The documentation only covers Cloudflare Pages, and it is incomplete. To improve it, we should add a section about Cloudflare Workers and provide more information on how to configure the correct preset. I will send a pull request soon.

  8. added
    plannedFeatures or content that are planned but not yet in progress.
    solidRelated to core Solid
    on Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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