Expo mongodb realm for web and mobile - Module parse failed

Hello,

I have tried the recent examples of using expo + mongodb realm + react native, and my goal is to create the same app for mobile and web. I have the mobile version up and running, but struggling with the web version. Does anyone have any direct experience here? My error message is as following when I try to “Open web” using expo.

Blockquote ./node_modules/@realm/react/dist/useObject.js 5:96
Module parse failed: Unexpected token (5:96)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See Concepts | webpack
| return function useObject(type, primaryKey) {
| const realm = useRealm();
const [object, setObject] = useState(() => realm.objectForPrimaryKey(type, primaryKey) ?? null);
| useEffect(() => {
| const listenerCallback = (_, changes) => {

Same thing happens to me.

Web Bundling complete 111740ms
./node_modules/@realm/react/dist/useObject.js 5:96
Module parse failed: Unexpected token (5:96)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See Concepts | webpack
| return function useObject(type, primaryKey) {
| const realm = useRealm();
const [object, setObject] = useState(() => realm.objectForPrimaryKey(type, primaryKey) ?? null);
| useEffect(() => {
| const listenerCallback = (_, changes) => {