mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
parent
4071c739a6
commit
3a75264da4
9 changed files with 28 additions and 83 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -31,7 +31,7 @@ webpackstats.json
|
|||
!/config/kibana.yml
|
||||
coverage
|
||||
selenium
|
||||
.babel_register_cache.json
|
||||
.babelcache.json
|
||||
.webpack.babelcache
|
||||
*.swp
|
||||
*.swo
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
"bluebird": "3.5.5",
|
||||
"boom": "^7.2.0",
|
||||
"brace": "0.11.1",
|
||||
"cache-loader": "4.0.0",
|
||||
"cache-loader": "1.2.2",
|
||||
"chalk": "^2.4.1",
|
||||
"color": "1.0.3",
|
||||
"commander": "2.20.0",
|
||||
|
|
|
@ -26,7 +26,7 @@ export const CreateEmptyDirsAndFilesTask = {
|
|||
await Promise.all([
|
||||
mkdirp(build.resolvePath('plugins')),
|
||||
mkdirp(build.resolvePath('data')),
|
||||
write(build.resolvePath('optimize/.babel_register_cache.json'), '{}'),
|
||||
write(build.resolvePath('optimize/.babelcache.json'), '{}'),
|
||||
]);
|
||||
},
|
||||
};
|
||||
|
|
|
@ -48,7 +48,6 @@ export const OptimizeBuildTask = {
|
|||
cwd: build.resolvePath('.'),
|
||||
env: {
|
||||
FORCE_DLL_CREATION: 'true',
|
||||
KBN_CACHE_LOADER_WRITABLE: 'true',
|
||||
NODE_OPTIONS: '--max-old-space-size=2048'
|
||||
},
|
||||
});
|
||||
|
|
|
@ -26,8 +26,6 @@ import del from 'del';
|
|||
import { makeRe } from 'minimatch';
|
||||
import mkdirp from 'mkdirp';
|
||||
|
||||
import { IS_KIBANA_DISTRIBUTABLE } from '../../utils';
|
||||
|
||||
import { UiBundle } from './ui_bundle';
|
||||
import { appEntryTemplate } from './app_entry_template';
|
||||
|
||||
|
@ -170,11 +168,7 @@ export class UiBundlesController {
|
|||
}
|
||||
|
||||
getCacheDirectory(...subPath) {
|
||||
return this.resolvePath(
|
||||
'../../built_assets/.cache/ui_bundles',
|
||||
!IS_KIBANA_DISTRIBUTABLE ? this.hashBundleEntries() : '',
|
||||
...subPath
|
||||
);
|
||||
return this.resolvePath('../.cache', this.hashBundleEntries(), ...subPath);
|
||||
}
|
||||
|
||||
getDescription() {
|
||||
|
|
|
@ -212,13 +212,15 @@ export default class BaseOptimizer {
|
|||
* of Kibana and just make compressing and extracting it more difficult.
|
||||
*/
|
||||
const maybeAddCacheLoader = (cacheName, loaders) => {
|
||||
if (IS_KIBANA_DISTRIBUTABLE) {
|
||||
return loaders;
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
loader: 'cache-loader',
|
||||
options: {
|
||||
cacheContext: fromRoot('.'),
|
||||
cacheDirectory: this.uiBundles.getCacheDirectory(cacheName),
|
||||
readOnly: process.env.KBN_CACHE_LOADER_WRITABLE ? false : IS_KIBANA_DISTRIBUTABLE
|
||||
cacheDirectory: this.uiBundles.getCacheDirectory(cacheName)
|
||||
}
|
||||
},
|
||||
...loaders
|
||||
|
|
|
@ -95,13 +95,19 @@ function generateDLL(config) {
|
|||
// Self calling function with the equivalent logic
|
||||
// from maybeAddCacheLoader one from base optimizer
|
||||
use: ((babelLoaderCacheDirPath, loaders) => {
|
||||
// Only deactivate cache-loader and thread-loader on
|
||||
// distributable. It is valid when running from source
|
||||
// both with dev or prod bundles or even when running
|
||||
// kibana for dev only.
|
||||
if (IS_KIBANA_DISTRIBUTABLE) {
|
||||
return loaders;
|
||||
}
|
||||
|
||||
return [
|
||||
{
|
||||
loader: 'cache-loader',
|
||||
options: {
|
||||
cacheContext: fromRoot('.'),
|
||||
cacheDirectory: babelLoaderCacheDirPath,
|
||||
readOnly: process.env.KBN_CACHE_LOADER_WRITABLE ? false : IS_KIBANA_DISTRIBUTABLE
|
||||
cacheDirectory: babelLoaderCacheDirPath
|
||||
}
|
||||
},
|
||||
...loaders
|
||||
|
|
|
@ -22,7 +22,7 @@ var resolve = require('path').resolve;
|
|||
// this must happen before `require('@babel/register')` and can't be changed
|
||||
// once the module has been loaded
|
||||
if (!process.env.BABEL_CACHE_PATH) {
|
||||
process.env.BABEL_CACHE_PATH = resolve(__dirname, '../../../optimize/.babel_register_cache.json');
|
||||
process.env.BABEL_CACHE_PATH = resolve(__dirname, '../../../optimize/.babelcache.json');
|
||||
}
|
||||
|
||||
// paths that @babel/register should ignore
|
||||
|
|
74
yarn.lock
74
yarn.lock
|
@ -7056,11 +7056,6 @@ buffer-indexof@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c"
|
||||
integrity sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==
|
||||
|
||||
buffer-json@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/buffer-json/-/buffer-json-2.0.0.tgz#f73e13b1e42f196fe2fd67d001c7d7107edd7c23"
|
||||
integrity sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw==
|
||||
|
||||
buffer-xor@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
|
||||
|
@ -7208,17 +7203,15 @@ cache-base@^1.0.1:
|
|||
union-value "^1.0.0"
|
||||
unset-value "^1.0.0"
|
||||
|
||||
cache-loader@4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/cache-loader/-/cache-loader-4.0.0.tgz#f85ffae27780f6ab5c6732b4f12b84cb6bf193d2"
|
||||
integrity sha512-QTLCBoDju/InytQyQNHsn0q0xDlInCtId09CW8BLhFZY72GcqDHGbJdSiulsv1YBwB4zvy2QhioPADoSAl7qjg==
|
||||
cache-loader@1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/cache-loader/-/cache-loader-1.2.2.tgz#6d5c38ded959a09cc5d58190ab5af6f73bd353f5"
|
||||
integrity sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==
|
||||
dependencies:
|
||||
buffer-json "^2.0.0"
|
||||
find-cache-dir "^3.0.0"
|
||||
loader-utils "^1.2.3"
|
||||
loader-utils "^1.1.0"
|
||||
mkdirp "^0.5.1"
|
||||
neo-async "^2.6.1"
|
||||
schema-utils "^1.0.0"
|
||||
neo-async "^2.5.0"
|
||||
schema-utils "^0.4.2"
|
||||
|
||||
cacheable-request@^2.1.1:
|
||||
version "2.1.4"
|
||||
|
@ -12263,15 +12256,6 @@ find-cache-dir@^2.1.0:
|
|||
make-dir "^2.0.0"
|
||||
pkg-dir "^3.0.0"
|
||||
|
||||
find-cache-dir@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.0.0.tgz#cd4b7dd97b7185b7e17dbfe2d6e4115ee3eeb8fc"
|
||||
integrity sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw==
|
||||
dependencies:
|
||||
commondir "^1.0.1"
|
||||
make-dir "^3.0.0"
|
||||
pkg-dir "^4.1.0"
|
||||
|
||||
find-index@^0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4"
|
||||
|
@ -12304,13 +12288,6 @@ find-up@^2.0.0, find-up@^2.1.0:
|
|||
dependencies:
|
||||
locate-path "^2.0.0"
|
||||
|
||||
find-up@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.0.0.tgz#c367f8024de92efb75f2d4906536d24682065c3a"
|
||||
integrity sha512-zoH7ZWPkRdgwYCDVoQTzqjG8JSPANhtvLhh4KVUHyKnaUJJrNeFmWIkTcNuJmR3GLMEmGYEf2S2bjgx26JTF+Q==
|
||||
dependencies:
|
||||
locate-path "^5.0.0"
|
||||
|
||||
find-versions@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-2.0.0.tgz#2ad90d490f6828c1aa40292cf709ac3318210c3c"
|
||||
|
@ -17577,13 +17554,6 @@ locate-path@^3.0.0:
|
|||
p-locate "^3.0.0"
|
||||
path-exists "^3.0.0"
|
||||
|
||||
locate-path@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
|
||||
integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
|
||||
dependencies:
|
||||
p-locate "^4.1.0"
|
||||
|
||||
locutus@^2.0.5:
|
||||
version "2.0.10"
|
||||
resolved "https://registry.yarnpkg.com/locutus/-/locutus-2.0.10.tgz#f903619466a98a4ab76e8b87a5854b55a743b917"
|
||||
|
@ -18316,13 +18286,6 @@ make-dir@^2.0.0, make-dir@^2.1.0:
|
|||
pify "^4.0.1"
|
||||
semver "^5.6.0"
|
||||
|
||||
make-dir@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.0.0.tgz#1b5f39f6b9270ed33f9f054c5c0f84304989f801"
|
||||
integrity sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==
|
||||
dependencies:
|
||||
semver "^6.0.0"
|
||||
|
||||
make-error@^1.3.5:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8"
|
||||
|
@ -19293,11 +19256,6 @@ neo-async@^2.6.0:
|
|||
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835"
|
||||
integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==
|
||||
|
||||
neo-async@^2.6.1:
|
||||
version "2.6.1"
|
||||
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
|
||||
integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
|
||||
|
||||
nested-error-stacks@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-1.0.2.tgz#19f619591519f096769a5ba9a86e6eeec823c3cf"
|
||||
|
@ -20385,13 +20343,6 @@ p-locate@^3.0.0:
|
|||
dependencies:
|
||||
p-limit "^2.0.0"
|
||||
|
||||
p-locate@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
|
||||
integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
|
||||
dependencies:
|
||||
p-limit "^2.2.0"
|
||||
|
||||
p-map@^1.1.1:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
|
||||
|
@ -21023,13 +20974,6 @@ pkg-dir@^3.0.0:
|
|||
dependencies:
|
||||
find-up "^3.0.0"
|
||||
|
||||
pkg-dir@^4.1.0:
|
||||
version "4.2.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3"
|
||||
integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==
|
||||
dependencies:
|
||||
find-up "^4.0.0"
|
||||
|
||||
pkg-up@2.0.0, pkg-up@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f"
|
||||
|
@ -24375,7 +24319,7 @@ schema-utils@^0.3.0:
|
|||
dependencies:
|
||||
ajv "^5.0.0"
|
||||
|
||||
schema-utils@^0.4.0, schema-utils@^0.4.5:
|
||||
schema-utils@^0.4.0, schema-utils@^0.4.2, schema-utils@^0.4.5:
|
||||
version "0.4.7"
|
||||
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187"
|
||||
integrity sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==
|
||||
|
@ -24495,7 +24439,7 @@ semver@^5.5.1:
|
|||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
|
||||
integrity sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==
|
||||
|
||||
semver@^6.0.0, semver@^6.1.0, semver@^6.1.1:
|
||||
semver@^6.1.0, semver@^6.1.1:
|
||||
version "6.1.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b"
|
||||
integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue