-
Notifications
You must be signed in to change notification settings - Fork 8.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
[siem/ui] avoid importing server code in ui #37103
Conversation
Pinging @elastic/secops |
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.
Thanks! LGTM
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 ❤️
That was a though one to find out 😅
I just run the optimizer and looks like no more Boom or hoek are being bundled into the browser bundles, so I think we will be fine!
💚 Build Succeeded |
* [siem/ui] avoid importing server code in ui * covert a couple extra imports
* [siem/ui] avoid importing server code in ui * covert a couple extra imports
Fixes #37016
We have an issue in IE11 caused by server code being imported into the UI unnecessarily. The culprit seems to the the siem app which is importing the index file from the plugin, which causes all of the server code including Hapi to be imported into the UI. To avoid this we need to make sure and put data that should be imported from both the server and UI into
common
directories and be careful when importing from the UI to not include more than necessary.We have ideas for how we can evolve our tooling to make this mistake harder to make, but for now it's just an unfortunate reality that it's a pretty easy mistake to make.
Major thanks to @mistic for tracking down the imports of the index.ts file in the UI!!