Closed
Description
Describe the bug
If I use:
import { Children } from 'react';
I get errors in the console like:
TypeError: q.toArray is not a function
Replacing it with:
import React from 'react'
and calling e.g React.Children.toArray() instead Children.toArray() of works fine
It's not just toArray, it's any function on Children
Reproduction
https://stackblitz.com/edit/vitejs-rolldown-vite-x8xgtbpn?file=src%2FApp.jsx
Steps to reproduce
No response
System Info
System:
OS: macOS 15.5
CPU: (12) arm64 Apple M3 Pro
Memory: 416.81 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 23.6.1 - /opt/homebrew/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 11.3.0 - ~/.npm/bin/npm
bun: 1.2.8 - /opt/homebrew/bin/bun
Browsers:
Chrome: 137.0.7151.68
Edge: 137.0.3296.62
Safari: 18.5
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs and the Rolldown-related guide.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
No labels