Skip to content
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

dashboard: fix and improve build #986

Merged
merged 11 commits into from
Aug 6, 2024
Merged

dashboard: fix and improve build #986

merged 11 commits into from
Aug 6, 2024

Conversation

koonpeng
Copy link
Collaborator

@koonpeng koonpeng commented Aug 2, 2024

Some fixes and improvement to the build script.

  1. Fix deps not being built before the dashboard build.
  2. Uses a simple and a bit crude way to allow some variables to be configured after the bundle is built, inspired by import-meta-env. It uses the same method but a bit more crude and specialized, advantage is that we don't need node at runtime.
  3. Improvement on how we load some configs so that they can be analyzed and removed by terser (used by vite internally). Particularly keycloak/stub authenticator, all the admin and custom tabs components can be removed from the bundle if they are disabled.
  4. Fix some issues when building in humble.

Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
…args

Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
@koonpeng koonpeng requested a review from aaronchongth August 2, 2024 10:25
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome! Thanks considering the code differences between staging and production. Just have a question down below

packages/dashboard/vite.config.ts Outdated Show resolved Hide resolved
packages/dashboard/vite.config.ts Show resolved Hide resolved
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
@koonpeng
Copy link
Collaborator Author

koonpeng commented Aug 5, 2024

New changes put all the build time config in buildConfig, fix some issues when building in humble and add a couple more build options.

@koonpeng koonpeng requested a review from aaronchongth August 5, 2024 04:55
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
Copy link
Member

@aaronchongth aaronchongth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@aaronchongth aaronchongth merged commit 10cc4bd into main Aug 6, 2024
4 checks passed
@aaronchongth aaronchongth deleted the koonpeng/fix-build branch August 6, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants