#Has anyone gotten bevy working with parcel as the bundler?

19 messages · Page 1 of 1 (latest)

craggy cargo
neat crag
#

Does that only happen when running with parcel or also without?

craggy cargo
#

I tried that and realized it didn't work! Turns out the example I copied removed a default feature that was necessary (not sure which one it was) and setting features to default fixed it

#

Unfortunately now I'm getting this error:

➜  react-bevy git:(main) ✗ npm run start

> [email protected] start
> parcel index.html

Server running at http://localhost:1234
🚨  /Users/jh/personal/dominari-container/react-bevy/crate/Cargo.toml: stdout maxBuffer length exceeded
    at new NodeError (node:internal/errors:387:5)
    at Socket.onChildStdout (node:child_process:468:14)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:285:11)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
#

I tried the webpack template but auto reload didn't seem to work and generally seemed harder to configure and slower for react, typescript, sass etc.

#

Would love to see any projects using bevy + parcel, or even just good working dev environments where bevy is integrated into a react app

neat crag
#

Does the parcel project just import the wasm binary or the entire rust project?

#

Maybe just importing the wasm binary and letting cargo own the rust side is a more stable solution

craggy cargo
#

Tried that and parcel couldn't find the exports 😦

#

I can get bevy to render the first frame now, but am getting this error

#

Uncaught RuntimeError: memory access out of bounds

#

appears to be a problem in __wbg_requestAnimationFrame_4181656476a7d86c

craggy cargo
craggy cargo
#

tl:dr: still don't understand what went wrong, but I found this scaffold using react + bevy + webpack and it works!