react-workspaces / react-workspaces-playground

⚛️ 🐈 Zero Config Create-React-App Monorepos with Yarn Workspaces, Lerna and React Storybook.
https://react-workspaces.github.io/react-workspaces-playground/
764 stars 128 forks source link

Any idea on how to run yarn build? #2

Closed wagwes closed 5 years ago

wagwes commented 5 years ago

Great work @F1LT3R, I'm able to actually get CRA hot reloading within a Lerna mono-repo!

Have you tried running yarn build within the CRA? We're using flow in our packages and when running yarn build, the build script fails due to an unexpected token (the unexpected token was a flow type definition).

It appears that when we build our CRA app, it is looking at "src:main": "src/index.js", where the un-transpiled code lives. Any idea on how one would point the CRA app to something like "src": "dist/index.js" where the transpiled code lives while maintaining hot-reloading?

F1LT3R commented 5 years ago

Can you upload a repo to demonstrate your setup? I'd be happy to take a look in that case.

I would think it's probably fixable.

F1LT3R commented 5 years ago

FWIW: you can probably fix this by adding "src": "src/index.js" as well as the "src:main": "src/index.js".