-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(dev): added Turbo monorepo / build runner #108
Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @pablo-abc on Vercel. @pablo-abc first needs to authorize it. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pberganza10/felte-docs/H1wJHPVLPFaxZBw1ggYZSUesxkQ3 [Deployment for d78370e canceled] |
Thanks! I had experimented a bit with Turbo but not decided yet if I wanted to move this repo to using it. Mainly due to the missing From this: Line 14 in d78370e
I understand this feature hasn't been implemented yet? What would be the advantage of using The main reason I had not gone with Turbo yet was that running
The packages I excluded were the examples (which I never need to build since they're meant for CodeSandbox which relies on the It seems some tests are failing, but I see you didn't modify any source code in that sense. Anyway, I'll pull this and see how it feels later today! |
Hello again :) Having tried Turbo on multiple projects (including this modest Felte PR), the benefits are immediately perceivable: much shorter build and re-build times (e.g. "watch" mode or just subsequent manual builds) thanks to cache replay of both the dist artefacts and the console log. The DX is much improved. |
Hey again! I tried this locally a bit and I do feel the improvements. I just saw this: vercel/turborepo#887 If you feel like it, I'd love it if we can wait for that before this gets merged! There's some specific niceties of "--filter" I have that I do miss while using this. Let me know what you think! |
I've been using Turbo's https://github.com/vercel/turborepo/releases/tag/v1.2.0 I'm not sure I'll have time to update this PR soon though 😢 |
Hello, I am closing this PR due to lack of activity. Keep up the good work :) |
https://turborepo.org/docs/getting-started
Without Turbo (PNPM recursive):
time pnpm build_
=>92.68s user 5.85s system 503% cpu 19.581 total
With Turbo:
time pnpm build
=>138.76s user 9.68s system 520% cpu 28.510 total
(cold run, no cache)time pnpm build
=>0.69s user 0.61s system 177% cpu 0.737 total
(subsequent run with full cache hit and "replay" of dist output + console log)I added the
clean-turbo
script inpackage.json
to delete Turbo caches (alternatively,--force
or--no-cache
can be passed topnpm build
on the command line).Note that the original
build
script was excluding specific packages, but Turbo builds everything faster.PS: I fixed a Preact typings issue (JSX), and I updated the PNPM lockfile in order to work around a React typings conflict (multiple different versions in
node_module
).UPDATE: I added a Turbo-driven alternative to the
dev
script in the rootpackage.json
. The developer experience is improved thanks to Turbo caching, compared with Rollup's own watcher mode.