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

refactor: convert platform functions to constants #2677

Merged
merged 4 commits into from
May 28, 2024

Conversation

kyubisation
Copy link
Contributor

@kyubisation kyubisation commented May 21, 2024

This PR converts the platform functions to constants, as the value will not change and re-evaluation is not necessary.

Additionally we hope to mitigate issues with the SWC compiler.

The problem with the SWC minifier seems to be caused by using isBrowser() in the static getter on SbbLanguageController. We replace this usage by isServer from lit, which is a constant.
This should prevent the symbol from isBrowser() to be removed, as the compiler can already remove it during build time.
@kyubisation kyubisation requested a review from jeripeierSBB as a code owner May 21, 2024 13:24
@github-actions github-actions bot added pr: peer review required A peer review is required for this pull request pr: visual review required diff-available labels May 21, 2024
@kyubisation kyubisation changed the title fix: attempt to mitigate SWC minifier refactor: convert platform functions to constants May 28, 2024
@kyubisation kyubisation merged commit 357dff0 into main May 28, 2024
29 of 32 checks passed
@kyubisation kyubisation deleted the kyubisation-patch-1 branch May 28, 2024 12:51
@github-actions github-actions bot removed the pr: peer review required A peer review is required for this pull request label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants