pmndrs / use-cannon

👋💣 physics based hooks for @react-three/fiber
https://cannon.pmnd.rs
2.74k stars 153 forks source link

feat: uses preconstruct for the monorepo #365

Closed gsimone closed 2 years ago

gsimone commented 2 years ago

Changes

Testing

Dev

Run:

yarn // installs all deps via workspaces & runs `preconstruct dev` to link local packages
yarn examples // launches the examples vite server

Navigate to the examples Make a change in anything in react-three-cannon and the vite server should refresh with the new changes

Build

Test a build, maybe publish as canary so we can try it around the world

TODO

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/pmndrs/use-cannon/FfpyY6B48mNSXkU1bXGW6ncQthYH
✅ Preview: Failed

bjornstar commented 2 years ago
  • moves examples outside of packages

Is this necessary?

gsimone commented 2 years ago
  • moves examples outside of packages

Is this necessary?

It makes it easier to just jump to examples for new users and makes it clear that they are not anything that's built/exported/published

isaac-mason commented 2 years ago

This looks great! Preconstruct looks like it offers a way better dev experience.

We are planning on moving more logic into the @pmndrs/cannon-worker-api package over time. So without a solve for the worker package, this would become less useful as we move things 😢

As far as I can see, preconstruct doesn't support custom rollup plugins/addons - unless there's something I've missed?

Will do a bit more reading...

bjornstar commented 2 years ago
  • moves examples outside of packages

Is this necessary?

It makes it easier to just jump to examples for new users and makes it clear that they are not anything that's built/exported/published

Let's leave it how it was.