-
Notifications
You must be signed in to change notification settings - Fork 420
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
ESBuild #2298
Merged
Merged
ESBuild #2298
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Kudos, SonarCloud Quality Gate passed! |
reshmakh
approved these changes
Jun 25, 2023
Glad to see the window opening for this change! I recall it getting stuck 6 months ago and am surprised/pleased that the window opened up now. |
mattwiller
approved these changes
Jun 26, 2023
Merged
codyebberson
added a commit
that referenced
this pull request
Jun 30, 2023
Update client-cloudwatch-logs manual mock to use aws-sdk-client-mock (#2342) Log resource for validator latency warning (#2338) Minor tweaks to aws init tool and docs (#2340) Allow contentReference elements to override cardinality rules (#2339) Fixes #2315 - allow bot success without return value (#2336) Fix app env vars in publish job (#2335) Fixes #2310 - CLI rest with --fhir-url-path (#2313) Unify all of the sleep helper functions (#2331) Increase Fargate health check grace period (#2330) Remove PWA and service worker (#2329) Updating subscription documentation to reflect behavior when resources are deleted (#2328) Add app to publish.sh (#2326) Fixes #2306 - remove console.log from export tests due to race conditions (#2322) Fixed landing page for storybook (#2323) Bring back sourcemaps (#2309) Split custom Medplum search parameter definitions into separate file (#2178) Poll status follow Location header (#2307) Copy .env.defaults to .env if not exists (#2308) Allow extra URL path content with Bot execute (#2305) Fixes #2182- All Patient Export (#2293) Strict validation of property cardinality (#2300) Request from ACN (#2299) Fixed CLI shebang (#2301) ESBuild (#2298) Add logs and parity tests for new validator (#2291) Fixes #2277 - Updated access policies docs (#2292) Add non-null requirements to values in GraphQL array types (#2290) Validating Fixed and Pattern Values (#2288) Fixes #2195 - updated cdk init docs (#2289)
Merged
codyebberson
added a commit
that referenced
this pull request
Jul 1, 2023
Update client-cloudwatch-logs manual mock to use aws-sdk-client-mock (#2342) Log resource for validator latency warning (#2338) Minor tweaks to aws init tool and docs (#2340) Allow contentReference elements to override cardinality rules (#2339) Fixes #2315 - allow bot success without return value (#2336) Fix app env vars in publish job (#2335) Fixes #2310 - CLI rest with --fhir-url-path (#2313) Unify all of the sleep helper functions (#2331) Increase Fargate health check grace period (#2330) Remove PWA and service worker (#2329) Updating subscription documentation to reflect behavior when resources are deleted (#2328) Add app to publish.sh (#2326) Fixes #2306 - remove console.log from export tests due to race conditions (#2322) Fixed landing page for storybook (#2323) Bring back sourcemaps (#2309) Split custom Medplum search parameter definitions into separate file (#2178) Poll status follow Location header (#2307) Copy .env.defaults to .env if not exists (#2308) Allow extra URL path content with Bot execute (#2305) Fixes #2182- All Patient Export (#2293) Strict validation of property cardinality (#2300) Request from ACN (#2299) Fixed CLI shebang (#2301) ESBuild (#2298) Add logs and parity tests for new validator (#2291) Fixes #2277 - Updated access policies docs (#2292) Add non-null requirements to values in GraphQL array types (#2290) Validating Fixed and Pattern Values (#2288) Fixes #2195 - updated cdk init docs (#2289)
Merged
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.
Replaces Rollup and Webpack with ESBuild and Vite.
Deployed to staging: https://app.staging.medplum.com/
Context
What is ESBuild?
esbuild is a CLI, NPM package, and Go module that makes bundling JavaScript accessible and fast.
This PR uses ESbuild for building libraries (
@medplum/core
,@medplum/react
, etc).What is Vite?
Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects.
This PR uses Vite for building apps (
@medplum/app
,@medplum/graphiql
)Note that we already use Vite in most of our example applications (
medplum-hello-world
,foomedical
).Why make this change?
There are many reasons to adopt ESBuild and Vite. The main two:
We have actually tried to make this change many times in the past. However, it has always got stuck for some reason or another (bugs, incompatibilities, dependency conflicts, etc). This time it looks like it's going to work.
Who uses these tools?
Notably, the TypeScript team themselves started using ESBuild for building TypeScript: microsoft/TypeScript#51387
Vite is used by many organizations such as [...]
Benchmarks
Build time
Method:
2x app speedup to 8x react speedup!
Package size
Method:
Package size is slightly larger (1-2%)
Dev server start time
This is difficult to measure objectively.
Using
app
:Webpack reports start time of 15.513 seconds:
Vite reports start time of 0.562 seconds:
Foo Medical
Before:
Main index.js is 188.21 kB gzipped
After:
Main index.js is 208.70 kB gzipped
So 11% bigger. Not great. That might warrant some investigation.