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

Infrastructure: Disable Webpack TerserPlugin for cached globals injection #283

Merged
merged 2 commits into from
Jul 30, 2023

Conversation

florian-h05
Copy link
Contributor

@florian-h05 florian-h05 commented Jul 29, 2023

Regression from #273.

Using the Webpack TerserPlugin to minimize web-packed, cached globals injection heavily decreased performance, therefore remove it.

Using the TerserPlugin to minimize web-packed to globals injection heavily decreased performance.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
@florian-h05 florian-h05 added the bug Something isn't working label Jul 30, 2023
@florian-h05 florian-h05 added this to the to be released milestone Jul 30, 2023
@florian-h05 florian-h05 changed the title Infrastructure: Disable TerserPlugin for web-packed globals injection Infrastructure: Disable Webpack TerserPlugin for cached globals injection Jul 30, 2023
@florian-h05 florian-h05 marked this pull request as ready for review July 30, 2023 10:03
@florian-h05 florian-h05 requested a review from a team as a code owner July 30, 2023 10:03
@florian-h05 florian-h05 merged commit 9188abc into openhab:main Jul 30, 2023
4 checks passed
@florian-h05 florian-h05 deleted the webpack-cached-version branch July 30, 2023 10:04
florian-h05 added a commit to florian-h05/openhab-js that referenced this pull request Aug 12, 2023
Fixes an issue, where the webpacked, globals injected `time.toZDT(items.Item)` did not work,
because openhab#283 did revert openhab#273 and therefore constructor names are not kept.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
florian-h05 added a commit that referenced this pull request Aug 12, 2023
Fixes an issue, where the webpacked, globals injected
`time.toZDT(items.Item)` did not work,
because #283 did revert
#273 and therefore constructor
names are not kept.

This introduces a `_isItem` helper method, which checks both constructor
name or unique properties (`rawItem`).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant