-
-
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
web: ESBuild performance + Live reload #13026
Conversation
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13026 +/- ##
==========================================
+ Coverage 92.62% 92.67% +0.04%
==========================================
Files 792 792
Lines 40222 40222
==========================================
+ Hits 37256 37274 +18
+ Misses 2966 2948 -18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
ab95483
to
ce57e1a
Compare
Signed-off-by: Teffen Ellis <[email protected]>
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.
lgtm cc @kensternberg-authentik
Details
This PR features two primary improvements to our ESBuild script:
Use of ESBuild's built-in watcher
Previously, we used Chokidar to track file changes ourselves, building all entry points if any file is changed. We can now limit rebuilds to the specific files within each entry, additionally getting a second performance boost from ESbuild's context caching.
Live-reload
Previously, modifying the front-end required manually refreshing the page, often several times in a a row to ensure the reload "caught" ESBuild's compiled output. ESBuild events are now relayed to the browser, allowing for automatic reloading.
This also includes a few ease of use behaviors such as...
Checklist
ak test authentik/
)make lint-fix
)If an API change has been made
make gen-build
)If changes to the frontend have been made
make web
)If applicable
make website
)