Skip to content

Vite react plugin doesn't work as it can't find dependencies #4

@itsdouges

Description

@itsdouges

Two problems currently:

  1. Prebundling can't find the dependencies (react, react/jsx-runtime, react/jsx-dev-runtime) as it's currently hardcoded in Vite to use the node resolver. We can "work around this" by removing them from config.optimizeDeps.include during configResolved step
  2. After doing that there is... still problems. Same issue basically.
2:28:45 pm [vite] Internal server error: Failed to resolve import "react/jsx-dev-runtime" from "react/jsx-dev-runtime". Does the file exist?

🤔

Initial way forward: Don't use it.
Next way forward: Fork?
Future way forward: Contribute to the plugin to make it work with Deno?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions