-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[kbn/ui-shared-deps] expand and split #62364
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7c83d04
[kbn/ui-shared-deps] expand and split
spalger 8ce6bb7
Merge branch 'master' into implement/ui-stateful-deps
elasticmachine 7834964
add two import styles for eui/react-dom that are new
spalger 5a2bbf5
Merge branch 'master' of github.com:elastic/kibana into implement/ui-…
spalger 821499d
Merge branch 'master' into implement/ui-stateful-deps
elasticmachine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,17 +20,14 @@ | |
const Path = require('path'); | ||
|
||
exports.distDir = Path.resolve(__dirname, 'target'); | ||
exports.distFilename = 'kbn-ui-shared-deps.js'; | ||
exports.jsDepFilenames = ['[email protected]']; | ||
exports.jsFilename = 'kbn-ui-shared-deps.js'; | ||
exports.baseCssDistFilename = 'kbn-ui-shared-deps.css'; | ||
exports.lightCssDistFilename = 'kbn-ui-shared-deps.light.css'; | ||
exports.darkCssDistFilename = 'kbn-ui-shared-deps.dark.css'; | ||
exports.externals = { | ||
// stateful deps | ||
angular: '__kbnSharedDeps__.Angular', | ||
'@elastic/charts': '__kbnSharedDeps__.ElasticCharts', | ||
'@elastic/eui': '__kbnSharedDeps__.ElasticEui', | ||
'@elastic/eui/lib/services': '__kbnSharedDeps__.ElasticEuiLibServices', | ||
'@elastic/eui/dist/eui_theme_light.json': '__kbnSharedDeps__.ElasticEuiLightTheme', | ||
'@elastic/eui/dist/eui_theme_dark.json': '__kbnSharedDeps__.ElasticEuiDarkTheme', | ||
'@kbn/i18n': '__kbnSharedDeps__.KbnI18n', | ||
'@kbn/i18n/angular': '__kbnSharedDeps__.KbnI18nAngular', | ||
'@kbn/i18n/react': '__kbnSharedDeps__.KbnI18nReact', | ||
|
@@ -45,4 +42,23 @@ exports.externals = { | |
'@kbn/ui-shared-deps/monaco': '__kbnSharedDeps__.Monaco', | ||
// this is how plugins/consumers from npm load monaco | ||
'monaco-editor/esm/vs/editor/editor.api': '__kbnSharedDeps__.MonacoBare', | ||
|
||
/** | ||
* big deps which are locked to a single version | ||
*/ | ||
rxjs: '__kbnSharedDeps__.Rxjs', | ||
'rxjs/operators': '__kbnSharedDeps__.RxjsOperators', | ||
'@elastic/charts': '__kbnSharedDeps__.ElasticCharts', | ||
'@elastic/eui': '__kbnSharedDeps__.ElasticEui', | ||
'@elastic/eui/lib/services': '__kbnSharedDeps__.ElasticEuiLibServices', | ||
'@elastic/eui/dist/eui_charts_theme': '__kbnSharedDeps__.ElasticEuiChartsTheme', | ||
'@elastic/eui/dist/eui_theme_light.json': '__kbnSharedDeps__.ElasticEuiLightTheme', | ||
'@elastic/eui/dist/eui_theme_dark.json': '__kbnSharedDeps__.ElasticEuiDarkTheme', | ||
|
||
/** | ||
* massive deps that we should really get rid of or reduce in size substantially | ||
*/ | ||
elasticsearch: '__kbnSharedDeps__.ElasticsearchBrowser', | ||
'elasticsearch-browser': '__kbnSharedDeps__.ElasticsearchBrowser', | ||
'elasticsearch-browser/elasticsearch': '__kbnSharedDeps__.ElasticsearchBrowser', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,41 @@ | ||
{ | ||
"name": "@kbn/ui-shared-deps", | ||
"version": "1.0.0", | ||
"license": "Apache-2.0", | ||
"private": true, | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"build": "node scripts/build", | ||
"kbn:bootstrap": "node scripts/build --dev", | ||
"kbn:watch": "node scripts/build --watch" | ||
}, | ||
"devDependencies": { | ||
"dependencies": { | ||
"@elastic/charts": "^18.1.1", | ||
"abortcontroller-polyfill": "^1.4.0", | ||
"@elastic/eui": "21.0.1", | ||
"@kbn/babel-preset": "1.0.0", | ||
"@kbn/dev-utils": "1.0.0", | ||
"@kbn/i18n": "1.0.0", | ||
"@yarnpkg/lockfile": "^1.1.0", | ||
"abortcontroller-polyfill": "^1.4.0", | ||
"angular": "^1.7.9", | ||
"core-js": "^3.2.1", | ||
"css-loader": "^3.4.2", | ||
"core-js": "^3.6.4", | ||
"custom-event-polyfill": "^0.3.0", | ||
"del": "^5.1.0", | ||
"elasticsearch-browser": "^16.7.0", | ||
"jquery": "^3.4.1", | ||
"mini-css-extract-plugin": "0.8.0", | ||
"moment": "^2.24.0", | ||
"moment-timezone": "^0.5.27", | ||
"monaco-editor": "~0.17.0", | ||
"react": "^16.12.0", | ||
"react-dom": "^16.12.0", | ||
"react-intl": "^2.8.0", | ||
"read-pkg": "^5.2.0", | ||
"react-router": "^5.1.2", | ||
"react-router-dom": "^5.1.2", | ||
"regenerator-runtime": "^0.13.3", | ||
"rxjs": "^6.5.3", | ||
"symbol-observable": "^1.2.0", | ||
"webpack": "^4.41.5", | ||
"whatwg-fetch": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@kbn/babel-preset": "1.0.0", | ||
"@kbn/dev-utils": "1.0.0", | ||
"css-loader": "^3.4.2", | ||
"del": "^5.1.0", | ||
"webpack": "^4.41.5" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9651,7 +9651,7 @@ core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.1, core-js@^2.5.3, | |
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" | ||
integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== | ||
|
||
core-js@^3.0.1, core-js@^3.0.4, core-js@^3.2.1, core-js@^3.4.1, core-js@^3.6.4: | ||
core-js@^3.0.1, core-js@^3.0.4, core-js@^3.4.1, core-js@^3.6.4: | ||
version "3.6.4" | ||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.4.tgz#440a83536b458114b9cb2ac1580ba377dc470647" | ||
integrity sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw== | ||
|
@@ -24284,7 +24284,7 @@ react-router-redux@^4.0.8: | |
resolved "https://registry.yarnpkg.com/react-router-redux/-/react-router-redux-4.0.8.tgz#227403596b5151e182377dab835b5d45f0f8054e" | ||
integrity sha1-InQDWWtRUeGCN32rg1tdRfD4BU4= | ||
|
||
[email protected]: | ||
[email protected], react-router@^5.1.2: | ||
version "5.1.2" | ||
resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.1.2.tgz#6ea51d789cb36a6be1ba5f7c0d48dd9e817d3418" | ||
integrity sha512-yjEuMFy1ONK246B+rsa0cUam5OeAQ8pyclRDgpxuSCrAlJ1qN9uZ5IgyKC7gQg0w8OM50NXHEegPh/ks9YuR2A== | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'd expect to see
lodash
here. it's beingoverused by every plugin literallyThere 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.
Yeah, the issue is that we don't have a single lodash version
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.
ok. that's almost ~400kB per bundle 😞
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.
Btw, is something like https://www.npmjs.com/package/babel-plugin-transform-imports already in place for libs like lodash?
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.
No, sounds like a great plugin to add