share specific instances of some ui packages#54079
Conversation
aa71ae7 to
093d659
Compare
093d659 to
06ccd70
Compare
|
Pinging @elastic/kibana-operations (Team:Operations) |
| }; | ||
|
|
||
| // We need to add react-addons (and a few other bits) for enzyme to work. | ||
| // https://github.com/airbnb/enzyme/blob/master/docs/guides/webpack.md |
There was a problem hiding this comment.
As stated at this url, this was no longer necessary after upgrading to enzyme 3
tylersmalley
left a comment
There was a problem hiding this comment.
Outside of the angular being called out for import/no-extraneous-dependencies, this LGTM.
Code looks strait forward and spent some time playing around with it. Your assumption around caching was correct. The vendor DLL is down to 18.7 MB, which is still not being included in the cache for FF in an incognito window.
|
Mind also adding ops as a codeowner for the new package? I want to make sure we're aware when folks add a new global package as we begin trimming down the vendors file. |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* share specific instances of some ui packages * remove unnecessary eslint changes, every package will define deps anyway * remove mentions of moment webpackShims in eslint resolver * remove use of lodash * list angular as dep for x-pack * add operations as codeowner of shared-deps pkg # Conflicts: # .github/CODEOWNERS # src/optimize/base_optimizer.js # yarn.lock
|
7.x/7.6: 02eead7 |
* master: (69 commits) [Graph] Fix various a11y issues (elastic#54097) Add ApplicationService app status management (elastic#50223) logs in one time (elastic#54447) Deprecate using `elasticsearch.ssl.certificate` without `elasticsearch.ssl.key` and vice versa (elastic#54392) [Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (elastic#54457) Security - Role Mappings UI (elastic#53620) [SIEM] [Detection engine] Permission II (elastic#54292) Allow User to Cleanup Repository from UI (elastic#53047) [Detection engine] Some UX for rule creation (elastic#54471) share specific instances of some ui packages (elastic#54079) [ML] APM modules configs for RUM Javascript and NodeJS (elastic#53792) [APM] Delay rendering invalid license notification (elastic#53924) [Graph] Improve error message on graph requests (elastic#54230) [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (elastic#53719) Unit Tests for common/lib (elastic#53736) [Graph] Only show explorable fields (elastic#54101) remove linting rule exception for markdown (elastic#54232) [Monitoring] Fetch shard data more efficiently (elastic#54028) [Maps] Add hiddenLayers option to embeddable map input (elastic#54355) Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (elastic#54391) ...
* master: (69 commits) [Graph] Fix various a11y issues (elastic#54097) Add ApplicationService app status management (elastic#50223) logs in one time (elastic#54447) Deprecate using `elasticsearch.ssl.certificate` without `elasticsearch.ssl.key` and vice versa (elastic#54392) [Optimizer] Fix a stack overflow with watch_cache when it attempts to delete very large folders. (elastic#54457) Security - Role Mappings UI (elastic#53620) [SIEM] [Detection engine] Permission II (elastic#54292) Allow User to Cleanup Repository from UI (elastic#53047) [Detection engine] Some UX for rule creation (elastic#54471) share specific instances of some ui packages (elastic#54079) [ML] APM modules configs for RUM Javascript and NodeJS (elastic#53792) [APM] Delay rendering invalid license notification (elastic#53924) [Graph] Improve error message on graph requests (elastic#54230) [ILM] Kibana should allow a min_age setting of 0ms in ILM policy phases (elastic#53719) Unit Tests for common/lib (elastic#53736) [Graph] Only show explorable fields (elastic#54101) remove linting rule exception for markdown (elastic#54232) [Monitoring] Fetch shard data more efficiently (elastic#54028) [Maps] Add hiddenLayers option to embeddable map input (elastic#54355) Pass termOrder and hasTermsAgg properties to serializeThresholdWatch function (elastic#54391) ...
Usually to maintain some level of module state, some packages require that a single instance is used per page, like
Reactand moment/moment-timezone. To support this for the up-coming new platform plugin build system, we need a static library containing all of these modules that can be linked to by other packages (using webpack externals or a similar feature in other compilers).To enable this the
@kbn/ui-shared-depspackage depends on a number of packages (seepackages/kbn-ui-shared-deps/package.json) and builds them into a bundle which, when loaded, creates a__kbnSharedDeps__global with themodule.exportsof each bundled dep exposed.Additionally, a node.js module is included in the package which lists the webpack
externalsconfiguration necessary to utilize these packages and a few helper values for finding the built source.As a side benefit, this will reduce the size of our vendors dll, but I don't think it will be enough to avoid the problems we've been having with caching that file.