[Canvas] Relocate pieces of buildEmbeddableFilters
which are required by the client.
#52343
Labels
buildEmbeddableFilters
which are required by the client.
#52343
TL;DR:
canvas/server/lib/build_embeddable_filters
is imported by client-side code, and probably should be refactored so it isn't all located in theserver
directory.More details:
In #52248, we addressed an issue that was causing Kibana to crash in IE11 due to a syntax error. (More details on the issue in that PR).
The problem arose when an import inside
canvas/server/lib/build_embeddable_filters.ts
was changed as follows:This change was technically correct in that new platform-style plugins should only be exporting static code & types via the top level
server/index
andpublic/index
(as there is no notion ofcommon
in the new platform).However, because
buildEmbeddableFilters
are imported by some common functions, which are in turn imported in the browser registry, it meant that browser code was indirectly importing static server code fromdata/server/index
. As a result, a bunch of server code was bundled up and sent to the client, and IE11 didn't know WTF to do with it 😄So even though the import was reverted in #52248, this is really only a temporary workaround. Ideally the pieces of
buildEmbeddableFilters
that are imported by the common functions should be extracted and relocated in apublic
directory somewhere... then the data plugin code it is relying on can be imported fromdata/public
instead, which should mitigate this issue.cc @elastic/kibana-app-arch
The text was updated successfully, but these errors were encountered: