chore(build): Avoid prebuilding api side, instead use an esbuild plugin#7672
Merged
dac09 merged 31 commits intoredwoodjs:mainfrom Apr 5, 2023
Merged
chore(build): Avoid prebuilding api side, instead use an esbuild plugin#7672dac09 merged 31 commits intoredwoodjs:mainfrom
dac09 merged 31 commits intoredwoodjs:mainfrom
Conversation
|
16 replays were recorded for c441253.
|
jtoar
reviewed
Feb 24, 2023
Contributor
jtoar
left a comment
There was a problem hiding this comment.
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)
dac09
commented
Feb 24, 2023
Contributor
Author
|
Todo
|
jaiakt
pushed a commit
to jaiakt/redwood
that referenced
this pull request
Apr 5, 2023
…in (redwoodjs#7672) Co-authored-by: Tobbe Lundberg <[email protected]> Co-authored-by: David Price <[email protected]>
dac09
added a commit
to dac09/redwood
that referenced
this pull request
Apr 6, 2023
…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)
jtoar
added a commit
that referenced
this pull request
Jan 18, 2024
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/prebuildfolder. 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->transformWithBabelto remove any confusion!d. I've verified that you can debug the api side by setting breakpoints