-
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
Changes from all commits
7c83d04
8ce6bb7
7834964
5a2bbf5
821499d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,31 +17,40 @@ | |
* under the License. | ||
*/ | ||
|
||
// import global polyfills before everything else | ||
require('./polyfills'); | ||
|
||
// must load before angular | ||
export const Jquery = require('jquery'); | ||
window.$ = window.jQuery = Jquery; | ||
|
||
export const Angular = require('angular'); | ||
export const ElasticCharts = require('@elastic/charts'); | ||
export const ElasticEui = require('@elastic/eui'); | ||
export const ElasticEuiLibServices = require('@elastic/eui/lib/services'); | ||
export const ElasticEuiLightTheme = require('@elastic/eui/dist/eui_theme_light.json'); | ||
export const ElasticEuiDarkTheme = require('@elastic/eui/dist/eui_theme_dark.json'); | ||
// stateful deps | ||
export const KbnI18n = require('@kbn/i18n'); | ||
export const KbnI18nAngular = require('@kbn/i18n/angular'); | ||
export const KbnI18nReact = require('@kbn/i18n/react'); | ||
export const Angular = require('angular'); | ||
export const Moment = require('moment'); | ||
export const MomentTimezone = require('moment-timezone/moment-timezone'); | ||
export const Monaco = require('./monaco.ts'); | ||
export const MonacoBare = require('monaco-editor/esm/vs/editor/editor.api'); | ||
export const React = require('react'); | ||
export const ReactDom = require('react-dom'); | ||
export const ReactDomServer = require('react-dom/server'); | ||
export const ReactIntl = require('react-intl'); | ||
export const ReactRouter = require('react-router'); // eslint-disable-line | ||
export const ReactRouterDom = require('react-router-dom'); | ||
export const Monaco = require('./monaco.ts'); | ||
export const MonacoBare = require('monaco-editor/esm/vs/editor/editor.api'); | ||
|
||
// load timezone data into moment-timezone | ||
Moment.tz.load(require('moment-timezone/data/packed/latest.json')); | ||
|
||
// big deps which are locked to a single version | ||
export const Rxjs = require('rxjs'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd expect to see There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. No, sounds like a great plugin to add |
||
export const RxjsOperators = require('rxjs/operators'); | ||
export const ElasticCharts = require('@elastic/charts'); | ||
spalger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
export const ElasticEui = require('@elastic/eui'); | ||
export const ElasticEuiLibServices = require('@elastic/eui/lib/services'); | ||
export const ElasticEuiLibServicesFormat = require('@elastic/eui/lib/services/format'); | ||
export const ElasticEuiLightTheme = require('@elastic/eui/dist/eui_theme_light.json'); | ||
export const ElasticEuiDarkTheme = require('@elastic/eui/dist/eui_theme_dark.json'); | ||
export const ElasticEuiChartsTheme = require('@elastic/eui/dist/eui_charts_theme'); | ||
|
||
// massive deps that we should really get rid of or reduce in size substantially | ||
export const ElasticsearchBrowser = require('elasticsearch-browser/elasticsearch.js'); |
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" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../yarn.lock |
This file was deleted.
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.
maybe we could later investigate why is that being used in the client side code 😃