Skip to content

Vite plugin does not work with Cloudflare vite plugin #1603

@kigawas

Description

@kigawas

Describe the bug

Run pnpm create cloudflare@latest my-react-router-app --framework=react-router and update vite config. Or see reproduction below.

Error: The following environment configurations are incompatible with the Cloudflare Vite plugin:
        - "ssr" environment: `resolve.external`: ["@vanilla-extract/css","@vanilla-extract/css/fileScope","@vanilla-extract/css/adapter"]
To resolve this issue, avoid setting `optimizeDeps.exclude` and `resolve.external` in your Cloudflare Worker environments.

Reproduction

https://github.com/kigawas/vanilla-extract-cloudflare

System Info

Not related

Used Package Manager

pnpm

Logs

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions