-
Notifications
You must be signed in to change notification settings - Fork 1k
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
chore(build): Avoid prebuilding api side, instead use an esbuild plugin #7672
Conversation
16 replays were recorded for c441253. 16 PassedrequireAuth graphql checks
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good @dac09! I was trying to come up with a few more ideas around error reporting when transforming with Babel doesn't work for whatever reason, but don't have any concrete suggestions yet. But submitting this review now to get post the two comments I had
…p-prebuild * 'main' of github.com:redwoodjs/redwood: chore(deps): update dependency @types/uuid to v9.0.1 (redwoodjs#7680) chore(deps): update dependency @replayio/playwright to v0.3.23 (redwoodjs#7677) chore(deps): update dependency @npmcli/arborist to v6.2.3 (redwoodjs#7675) chore(deps): update dependency @envelop/types to v3.0.2 (redwoodjs#7674) chore: add codemod for clerk fix in v4.2.0 (redwoodjs#7676) chore(deps): update dependency @clerk/types to v3.28.1 (redwoodjs#7652) chore(deps): update dependency @envelop/testing to v5.0.6 (redwoodjs#7673) Update directives.md (redwoodjs#7670) fix(deps): update dependency vscode-languageserver-types to v3.17.3 (redwoodjs#7636) Fix `yarn rw exec` to set nonzero exit code on error (redwoodjs#7660)
Todo
|
…in (redwoodjs#7672) Co-authored-by: Tobbe Lundberg <[email protected]> Co-authored-by: David Price <[email protected]>
…te-ssr * 'feat/vite-ssr' of github.com:dac09/redwood: chore(build): Avoid prebuilding api side, instead use an esbuild plugin (redwoodjs#7672) chore(deps): update dependency @clerk/clerk-react to v4.14.2 (redwoodjs#8016) chore(deps): update dependency @azure/msal-browser to v2.35.0 (redwoodjs#8009) chore(deps): update dependency @supabase/supabase-js to v2.14.0 (redwoodjs#8010) fix(deps): update typescript-eslint monorepo to v5.57.1 (redwoodjs#8008) fix(deps): update dependency core-js to v3.30.0 (redwoodjs#8007) chore(deps): update dependency @playwright/test to v1.32.2 (redwoodjs#8005) fix(deps): update dependency @fastify/static to v6.10.0 (redwoodjs#7999) chore(deps): update dependency dependency-cruiser to v12.11.1 (redwoodjs#7998) Update docs to reference creating an ED25519 key instead of RSA (redwoodjs#8013) chore(deps): update dependency @types/react to v18.0.33 (redwoodjs#7996) chore(deps): update dependency @replayio/playwright to v0.3.28 (redwoodjs#8006) chore(deps): update dependency esbuild to v0.17.15 (redwoodjs#7994) chore(deps): update mheap/github-action-required-labels action to v4 (redwoodjs#7997) chore(ci): Update node version for telemetry check (redwoodjs#8004)
…in (#9767) Resurrecting this again, to see if I can get CI more stable this time **2nd edition Implementation:** With the second edition, I'm trying esbuild's watcher - rather than chokidar This is a no go ❌, because when new files are introduced the watcher isn't triggered. **3rd edition implementation**: Use esbuild's `rebuild` function that _may_ provide performance benefits Old PR #7672 --------- Co-authored-by: Tobbe Lundberg <[email protected]> Co-authored-by: Dominic Saadi <[email protected]>
What does this PR do?
Removes FS-based prebuild process
This changes the API side build process to "prebuild" files in memory with babel, rather than write to the
.redwood/prebuild
folder. Instead of prebuilding to file system, then transforming with esbuild again, we now use an esbuild plugin to do the same in memory - eliminating all the unnecessary read and writes to the FS.We should see the dev server (and build process) speed up, particularly for Windows users
Notes
a. In order to use plugins, I switched to the async esbuild build function. This is likely better for perf anyway!
b. We still prebuild files for our tests. This is still handy to do!
c. Renamed
prebuildFile
->transformWithBabel
to remove any confusion!d. I've verified that you can debug the api side by setting breakpoints