Skip to content

Commit eaf70a0

Browse files
Spencerspalger
Spencer
andauthored
[kbn/ui-shared-deps] split into two packages (elastic#110558)
* [kbn/ui-shared-deps] split into two packages * fix asset categorizer * update snapshots * reference npm dll from optimizer Co-authored-by: spalger <spalger@users.noreply.github.com>
1 parent ea3bb98 commit eaf70a0

File tree

92 files changed

+764
-379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+764
-379
lines changed

.buildkite/scripts/post_build_kibana.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [[ ! "${DISABLE_CI_STATS_SHIPPING:-}" ]]; then
66
echo "--- Ship Kibana Distribution Metrics to CI Stats"
77
node scripts/ship_ci_stats \
88
--metrics target/optimizer_bundle_metrics.json \
9-
--metrics build/kibana/node_modules/@kbn/ui-shared-deps/shared_built_assets/metrics.json
9+
--metrics build/kibana/node_modules/@kbn/ui-shared-deps-src/shared_built_assets/metrics.json
1010
fi
1111

1212
echo "--- Upload Build Artifacts"

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ snapshots.js
3434
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
3535
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
3636
/packages/kbn-ui-framework/dist
37-
/packages/kbn-ui-shared-deps/src/flot_charts
37+
/packages/kbn-ui-shared-deps-src/src/flot_charts
3838
/packages/kbn-monaco/src/painless/antlr
3939

4040
# Bazel

.eslintrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ module.exports = {
14921492
},
14931493
},
14941494
{
1495-
files: ['packages/kbn-ui-shared-deps/src/flot_charts/**/*.js'],
1495+
files: ['packages/kbn-ui-shared-deps-src/src/flot_charts/**/*.js'],
14961496
env: {
14971497
jquery: true,
14981498
},

.github/CODEOWNERS

+2-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@
198198
/packages/kbn-optimizer/ @elastic/kibana-operations
199199
/packages/kbn-pm/ @elastic/kibana-operations
200200
/packages/kbn-test/ @elastic/kibana-operations
201-
/packages/kbn-ui-shared-deps/ @elastic/kibana-operations
201+
/packages/kbn-ui-shared-deps-npm/ @elastic/kibana-operations
202+
/packages/kbn-ui-shared-deps-src/ @elastic/kibana-operations
202203
/packages/kbn-es-archiver/ @elastic/kibana-operations
203204
/packages/kbn-utils/ @elastic/kibana-operations
204205
/packages/kbn-cli-dev-mode/ @elastic/kibana-operations

.i18nrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"uiActionsExamples": "examples/ui_action_examples",
1616
"share": "src/plugins/share",
1717
"home": "src/plugins/home",
18-
"flot": "packages/kbn-ui-shared-deps/src/flot_charts",
18+
"flot": "packages/kbn-ui-shared-deps-src/src/flot_charts",
1919
"charts": "src/plugins/charts",
2020
"esUi": "src/plugins/es_ui_shared",
2121
"devTools": "src/plugins/dev_tools",

dev_docs/key_concepts/performance.mdx

+4-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ longer necessary for us to include the `optimizer` in the
6666
distributable version of Kibana Every plugin artifact contains all
6767
plugin dependencies required to run the plugin, except some
6868
stateful dependencies shared across plugin bundles via
69-
`@kbn/ui-shared-deps`. This means that plugin artifacts _tend to
70-
be larger_ than they were in the legacy platform. To understand the
71-
current size of your plugin artifact, run `@kbn/optimizer` with:
69+
`@kbn/ui-shared-deps-npm` and `@kbn/ui-shared-deps-src`. This means
70+
that plugin artifacts _tend to be larger_ than they were in the
71+
legacy platform. To understand the current size of your plugin
72+
artifact, run `@kbn/optimizer` with:
7273

7374
```bash
7475
node scripts/build_kibana_platform_plugins.js --dist --profile --focus=my_plugin

docs/developer/best-practices/performance.asciidoc

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ longer necessary for us to include the `optimizer` in the
5959
distributable version of {kib}. Every plugin artifact contains all
6060
plugin dependencies required to run the plugin, except some
6161
stateful dependencies shared across plugin bundles via
62-
`@kbn/ui-shared-deps`. This means that plugin artifacts _tend to
63-
be larger_ than they were in the legacy platform. To understand the
64-
current size of your plugin artifact, run `@kbn/optimizer` with:
62+
`@kbn/ui-shared-deps-npm` and `@kbn/ui-shared-deps-src`. This means
63+
that plugin artifacts _tend to be larger_ than they were in the
64+
legacy platform. To understand the current size of your plugin
65+
artifact, run `@kbn/optimizer` with:
6566

6667
[source,bash]
6768
----

docs/developer/getting-started/monorepo-packages.asciidoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ yarn kbn watch
103103
- @kbn/test-subj-selector
104104
- @kbn/tinymath
105105
- @kbn/ui-framework
106-
- @kbn/ui-shared-deps
106+
- @kbn/ui-shared-deps-npm
107+
- @kbn/ui-shared-deps-src
107108
- @kbn/utility-types
108109
- @kbn/utils

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@
158158
"@kbn/tinymath": "link:bazel-bin/packages/kbn-tinymath",
159159
"@kbn/typed-react-router-config": "link:bazel-bin/packages/kbn-typed-react-router-config",
160160
"@kbn/ui-framework": "link:bazel-bin/packages/kbn-ui-framework",
161-
"@kbn/ui-shared-deps": "link:bazel-bin/packages/kbn-ui-shared-deps",
161+
"@kbn/ui-shared-deps-npm": "link:bazel-bin/packages/kbn-ui-shared-deps-npm",
162+
"@kbn/ui-shared-deps-src": "link:bazel-bin/packages/kbn-ui-shared-deps-src",
162163
"@kbn/utility-types": "link:bazel-bin/packages/kbn-utility-types",
163164
"@kbn/utils": "link:bazel-bin/packages/kbn-utils",
164165
"@loaders.gl/core": "^2.3.1",

packages/BUILD.bazel

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ filegroup(
6262
"//packages/kbn-tinymath:build",
6363
"//packages/kbn-typed-react-router-config:build",
6464
"//packages/kbn-ui-framework:build",
65-
"//packages/kbn-ui-shared-deps:build",
65+
"//packages/kbn-ui-shared-deps-npm:build",
66+
"//packages/kbn-ui-shared-deps-src:build",
6667
"//packages/kbn-utility-types:build",
6768
"//packages/kbn-utils:build",
6869
],

packages/kbn-babel-preset/styled_components_files.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = {
1212
* Used by `kbn-babel-preset` and `elastic-eslint-config-kibana`.
1313
*/
1414
USES_STYLED_COMPONENTS: [
15-
/packages[\/\\]kbn-ui-shared-deps[\/\\]/,
15+
/packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/,
1616
/src[\/\\]plugins[\/\\](data|kibana_react)[\/\\]/,
1717
/x-pack[\/\\]plugins[\/\\](apm|beats_management|cases|fleet|infra|lists|observability|osquery|security_solution|timelines|uptime)[\/\\]/,
1818
/x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/,

packages/kbn-monaco/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# @kbn/monaco
22

3-
A customized version of monaco that is automatically configured the way we want it to be when imported as `@kbn/monaco`. Additionally, imports to this package are automatically shared with all plugins using `@kbn/ui-shared-deps`.
3+
A customized version of monaco that is automatically configured the way we want it to be when imported as `@kbn/monaco`. Additionally, imports to this package are automatically shared with all plugins using `@kbn/ui-shared-deps-npm` and `@kbn/ui-shared-deps-src`.
44

55
Includes custom xjson language support. The `es_ui_shared` plugin has an example of how to use it, in the future we will likely expose helpers from this package to make using it everywhere a little more seamless.

packages/kbn-optimizer/BUILD.bazel

+4-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ RUNTIME_DEPS = [
3434
"//packages/kbn-config",
3535
"//packages/kbn-dev-utils",
3636
"//packages/kbn-std",
37-
"//packages/kbn-ui-shared-deps",
37+
"//packages/kbn-ui-shared-deps-npm",
38+
"//packages/kbn-ui-shared-deps-src",
3839
"//packages/kbn-utils",
3940
"@npm//chalk",
4041
"@npm//clean-webpack-plugin",
@@ -63,7 +64,8 @@ TYPES_DEPS = [
6364
"//packages/kbn-config",
6465
"//packages/kbn-dev-utils",
6566
"//packages/kbn-std",
66-
"//packages/kbn-ui-shared-deps",
67+
"//packages/kbn-ui-shared-deps-npm",
68+
"//packages/kbn-ui-shared-deps-src",
6769
"//packages/kbn-utils",
6870
"@npm//chalk",
6971
"@npm//clean-webpack-plugin",

packages/kbn-optimizer/src/integration_tests/__snapshots__/basic_optimization.test.ts.snap

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ it('builds expected bundles, saves bundle counts to metadata', async () => {
132132
expect(foo.cache.getModuleCount()).toBe(6);
133133
expect(foo.cache.getReferencedFiles()).toMatchInlineSnapshot(`
134134
Array [
135-
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/<platform>-fastbuild/bin/packages/kbn-ui-shared-deps/target_node/public_path_module_creator.js,
135+
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/<platform>-fastbuild/bin/packages/kbn-ui-shared-deps-npm/target_node/public_path_module_creator.js,
136136
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/kibana.json,
137137
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/public/async_import.ts,
138138
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/public/ext.ts,
@@ -155,7 +155,7 @@ it('builds expected bundles, saves bundle counts to metadata', async () => {
155155
<absolute path>/node_modules/@kbn/optimizer/postcss.config.js,
156156
<absolute path>/node_modules/css-loader/package.json,
157157
<absolute path>/node_modules/style-loader/package.json,
158-
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/<platform>-fastbuild/bin/packages/kbn-ui-shared-deps/target_node/public_path_module_creator.js,
158+
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/<platform>-fastbuild/bin/packages/kbn-ui-shared-deps-npm/target_node/public_path_module_creator.js,
159159
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/kibana.json,
160160
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/public/index.scss,
161161
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/public/index.ts,
@@ -175,7 +175,7 @@ it('builds expected bundles, saves bundle counts to metadata', async () => {
175175

176176
expect(baz.cache.getReferencedFiles()).toMatchInlineSnapshot(`
177177
Array [
178-
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/<platform>-fastbuild/bin/packages/kbn-ui-shared-deps/target_node/public_path_module_creator.js,
178+
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/bazel-out/<platform>-fastbuild/bin/packages/kbn-ui-shared-deps-npm/target_node/public_path_module_creator.js,
179179
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/x-pack/baz/kibana.json,
180180
<absolute path>/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/x-pack/baz/public/index.ts,
181181
<absolute path>/packages/kbn-optimizer/src/worker/entry_point_creator.ts,

packages/kbn-optimizer/src/worker/populate_bundle_cache_plugin.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
isNormalModule,
2020
isIgnoredModule,
2121
isConcatenatedModule,
22+
isDelegatedModule,
2223
getModulePath,
2324
} from './webpack_helpers';
2425

@@ -118,7 +119,7 @@ export class PopulateBundleCachePlugin {
118119
continue;
119120
}
120121

121-
if (isExternalModule(module) || isIgnoredModule(module)) {
122+
if (isExternalModule(module) || isIgnoredModule(module) || isDelegatedModule(module)) {
122123
continue;
123124
}
124125

packages/kbn-optimizer/src/worker/webpack.config.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import TerserPlugin from 'terser-webpack-plugin';
1515
import webpackMerge from 'webpack-merge';
1616
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
1717
import CompressionPlugin from 'compression-webpack-plugin';
18-
import * as UiSharedDeps from '@kbn/ui-shared-deps';
18+
import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm';
19+
import UiSharedDepsSrc from '@kbn/ui-shared-deps-src';
1920

2021
import { Bundle, BundleRefs, WorkerConfig } from '../common';
2122
import { BundleRefsPlugin } from './bundle_refs_plugin';
@@ -65,7 +66,7 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker:
6566
},
6667
},
6768

68-
externals: [UiSharedDeps.externals],
69+
externals: [UiSharedDepsSrc.externals],
6970

7071
plugins: [
7172
new CleanWebpackPlugin(),
@@ -90,7 +91,7 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker:
9091
include: [ENTRY_CREATOR],
9192
use: [
9293
{
93-
loader: UiSharedDeps.publicPathLoader,
94+
loader: UiSharedDepsNpm.publicPathLoader,
9495
options: {
9596
key: bundle.id,
9697
},
@@ -260,6 +261,10 @@ export function getWebpackConfig(bundle: Bundle, bundleRefs: BundleRefs, worker:
260261
test: /\.(js|css)$/,
261262
cache: false,
262263
}),
264+
new webpack.DllReferencePlugin({
265+
context: worker.repoRoot,
266+
manifest: require(UiSharedDepsNpm.dllManifestPath),
267+
}),
263268
],
264269

265270
optimization: {

packages/kbn-optimizer/src/worker/webpack_helpers.ts

+11
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,17 @@ export function isConcatenatedModule(module: any): module is WebpackConcatenated
151151
return module?.constructor?.name === 'ConcatenatedModule';
152152
}
153153

154+
/** module replacing imports for DLL referenced */
155+
export interface WebpackDelegatedModule {
156+
type: string;
157+
id: number;
158+
dependencies: unknown[];
159+
}
160+
161+
export function isDelegatedModule(module: any): module is WebpackDelegatedModule {
162+
return module?.constructor?.name === 'DelegatedModule';
163+
}
164+
154165
export function getModulePath(module: WebpackNormalModule) {
155166
const queryIndex = module.resource.indexOf('?');
156167
return queryIndex === -1 ? module.resource : module.resource.slice(0, queryIndex);

packages/kbn-storybook/BUILD.bazel

+4-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ NPM_MODULE_EXTRA_FILES = [
3030

3131
RUNTIME_DEPS = [
3232
"//packages/kbn-dev-utils",
33-
"//packages/kbn-ui-shared-deps",
33+
"//packages/kbn-ui-shared-deps-npm",
34+
"//packages/kbn-ui-shared-deps-src",
3435
"@npm//@storybook/addons",
3536
"@npm//@storybook/api",
3637
"@npm//@storybook/components",
@@ -46,7 +47,8 @@ RUNTIME_DEPS = [
4647

4748
TYPES_DEPS = [
4849
"//packages/kbn-dev-utils",
49-
"//packages/kbn-ui-shared-deps",
50+
"//packages/kbn-ui-shared-deps-npm",
51+
"//packages/kbn-ui-shared-deps-src",
5052
"@npm//@storybook/addons",
5153
"@npm//@storybook/api",
5254
"@npm//@storybook/components",

packages/kbn-storybook/src/lib/register_theme_switcher_addon.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function registerThemeSwitcherAddon() {
2222
) as HTMLLinkElement | null;
2323

2424
if (stylesheet) {
25-
stylesheet.href = `kbn-ui-shared-deps.${globals.euiTheme}.css`;
25+
stylesheet.href = `kbn-ui-shared-deps-npm.${globals.euiTheme}.css`;
2626
}
2727
});
2828

packages/kbn-storybook/src/lib/run_storybook_cli.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import { join } from 'path';
1010
import { logger } from '@storybook/node-logger';
1111
import buildStandalone from '@storybook/react/standalone';
1212
import { Flags, run } from '@kbn/dev-utils';
13-
import { distDir } from '@kbn/ui-shared-deps';
13+
import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm';
14+
import UiSharedDepsSrc from '@kbn/ui-shared-deps-src';
1415
import * as constants from './constants';
1516

1617
// Convert the flags to a Storybook loglevel
@@ -35,7 +36,7 @@ export function runStorybookCli({ configDir, name }: { configDir: string; name:
3536
async ({ flags, log }) => {
3637
log.debug('Global config:\n', constants);
3738

38-
const staticDir = [distDir];
39+
const staticDir = [UiSharedDepsNpm.distDir, UiSharedDepsSrc.distDir];
3940
const config: Record<string, any> = {
4041
configDir,
4142
mode: flags.site ? 'static' : 'dev',

packages/kbn-storybook/src/webpack.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Side Public License, v 1.
77
*/
88

9-
import { externals } from '@kbn/ui-shared-deps';
9+
import { externals } from '@kbn/ui-shared-deps-src';
1010
import { stringifyRequest } from 'loader-utils';
1111
import { resolve } from 'path';
1212
import { Configuration, Stats } from 'webpack';

packages/kbn-storybook/templates/index.ejs

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<!-- This is a copy of the
33
[Storybook IFrame template](https://github.com/storybookjs/storybook/blob/7874ca357c6cb54f3f258dc61f6becae6783fba6/lib/core/src/server/templates/index.ejs).
4-
We use this one instead because we want to add the @kbn/ui-shared-deps tags here.
4+
We use this one instead because we want to add the @kbn/ui-shared-deps-* tags here.
55
-->
66
<html lang="en">
77
<head>
@@ -16,12 +16,13 @@
1616

1717
<!-- Added for Kibana shared dependencies -->
1818
<script>
19-
window.__kbnPublicPath__ = { 'kbn-ui-shared-deps': '.' };
19+
window.__kbnPublicPath__ = { 'kbn-ui-shared-deps-npm': '.', 'kbn-ui-shared-deps-src': '.' };
2020
</script>
21-
<script src="kbn-ui-shared-deps.@elastic.js"></script>
22-
<script src="kbn-ui-shared-deps.js"></script>
23-
<link href="kbn-ui-shared-deps.css" rel="stylesheet" />
24-
<link id="eui-theme-css" href="kbn-ui-shared-deps.v8.light.css" rel="stylesheet" />
21+
<script src="kbn-ui-shared-deps-npm.@elastic.js"></script>
22+
<script src="kbn-ui-shared-deps-npm.js"></script>
23+
<script src="kbn-ui-shared-deps-src.js"></script>
24+
<link href="kbn-ui-shared-deps-npm.css" rel="stylesheet" />
25+
<link id="eui-theme-css" href="kbn-ui-shared-deps-npm.v8.light.css" rel="stylesheet" />
2526
<!-- -->
2627

2728
<% if (typeof headHtmlSnippet !== 'undefined') { %> <%= headHtmlSnippet %> <% } %> <%

packages/kbn-ui-shared-deps/BUILD.bazel packages/kbn-ui-shared-deps-npm/BUILD.bazel

+9-17
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
33
load("@npm//webpack-cli:index.bzl", webpack = "webpack_cli")
44
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
55

6-
PKG_BASE_NAME = "kbn-ui-shared-deps"
7-
PKG_REQUIRE_NAME = "@kbn/ui-shared-deps"
6+
PKG_BASE_NAME = "kbn-ui-shared-deps-npm"
7+
PKG_REQUIRE_NAME = "@kbn/ui-shared-deps-npm"
88

99
SOURCE_FILES = glob(
1010
[
@@ -23,20 +23,13 @@ filegroup(
2323
)
2424

2525
NPM_MODULE_EXTRA_FILES = [
26-
"flot_charts/package.json",
27-
"theme/package.json",
26+
"eui_theme_vars/package.json",
2827
"package.json",
2928
"README.md"
3029
]
3130

3231
RUNTIME_DEPS = [
3332
"//packages/elastic-datemath",
34-
"//packages/elastic-safer-lodash-set",
35-
"//packages/kbn-analytics",
36-
"//packages/kbn-babel-preset",
37-
"//packages/kbn-i18n",
38-
"//packages/kbn-monaco",
39-
"//packages/kbn-std",
4033
"//packages/kbn-utils",
4134
"@npm//@elastic/charts",
4235
"@npm//@elastic/eui",
@@ -45,6 +38,7 @@ RUNTIME_DEPS = [
4538
"@npm//abortcontroller-polyfill",
4639
"@npm//angular",
4740
"@npm//babel-loader",
41+
"@npm//babel-plugin-transform-react-remove-prop-types",
4842
"@npm//core-js",
4943
"@npm//css-loader",
5044
"@npm//fflate",
@@ -71,14 +65,12 @@ RUNTIME_DEPS = [
7165
"@npm//whatwg-fetch"
7266
]
7367

68+
WEBPACK_DEPS = [
69+
"@npm//clean-webpack-plugin",
70+
]
71+
7472
TYPES_DEPS = [
7573
"//packages/elastic-datemath",
76-
"//packages/elastic-safer-lodash-set",
77-
"//packages/kbn-analytics",
78-
"//packages/kbn-babel-preset",
79-
"//packages/kbn-i18n",
80-
"//packages/kbn-monaco",
81-
"//packages/kbn-std",
8274
"//packages/kbn-utils",
8375
"@npm//@elastic/charts",
8476
"@npm//@elastic/eui",
@@ -146,7 +138,7 @@ ts_project(
146138

147139
webpack(
148140
name = "shared_built_assets",
149-
data = RUNTIME_DEPS + [
141+
data = RUNTIME_DEPS + WEBPACK_DEPS + [
150142
"//:package.json",
151143
":srcs",
152144
":tsconfig",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `@kbn/ui-shared-deps-npm`
2+
3+
Shared dependencies that must only have a single instance and also come from NPM are installed and re-exported from here. To consume them, import the package and merge the `externals` export into your webpack config so that all references to the supported modules will be remapped to use the global versions.

0 commit comments

Comments
 (0)