-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
astro dev logs emitFile() serve-mode warning when @astrojs/react is enabled #15975
Copy link
Copy link
Closed
Closed
Copy link
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)pkg: reactRelated to React (scope)Related to React (scope)
Description
Astro Info
Astro v6.0.5
Vite v7.3.1
Node v24.13.0
System macOS (arm64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/react (v5.0.0)
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Enabling the React integration in a minimal Astro app triggers this warning during astro dev:
[WARN] [vite] [plugin:astro:scripts] context method emitFile() is not supported in serve mode. This plugin is likely not vite-compatible.
This happens even in a very small repro with:
- astro@6.0.5
- @astrojs/react@5.0.0
- react@19.2.4
- react-dom@19.2.4
The app does not need any actual React component usage to reproduce it. The warning appears in dev mode when the React integration is enabled.
What's the expected result?
astro dev should start without the emitFile() compatibility warning when using the official @astrojs/react integration.
Since this is an Astro-maintained integration, I would expect it to be fully compatible with Astro/Vite dev mode and not log a warning that suggests an incompatible plugin.
Link to Minimal Reproducible Example
https://github.com/smn-cds/astro-emitfile-repro
Participation
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P2: nice to haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)pkg: astroRelated to the core `astro` package (scope)Related to the core `astro` package (scope)pkg: reactRelated to React (scope)Related to React (scope)