Open phanthaoIT opened 1 week ago
Can you provide any reproduction? Our exports look to be correct, this is likely a tooling issue on your end.
Do you mean to use require
instead?
Hi @rschristian, I followed the guide to add Babel transform, My project is just a React Native app but the babel has the errorCannot import useSignals outside of an ESM module file
. The signal can work but I need to add manual import { useSignals } from '@preact/signals-react/runtime';
.
My project is just a React Native app
We need an actual reproduction in order to help, this isn't enough to go on.
We do ship both CJS & ESM builds, your config may be pulling the wrong one?
Environment
@preact/signals-core
@preact/signals
@preact/signals-react
Describe the bug I added babel plugin but it doesn't work in React Native. it throws error:
Cannot import useSignals outside of an ESM module file