mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Merge pull request #7551 from spalger/fix/invalidBundlesBuild
[optimizer] rebuild all bundles when any are invalid
This commit is contained in:
commit
143e733e9a
1 changed files with 3 additions and 5 deletions
|
@ -19,13 +19,11 @@ module.exports = async (kbnServer, server, config) => {
|
|||
server.exposeStaticDir('/bundles/{path*}', bundles.env.workingDir);
|
||||
await bundles.writeEntryFiles();
|
||||
|
||||
// in prod, only bundle what looks invalid or missing
|
||||
if (config.get('optimize.useBundleCache')) {
|
||||
bundles = await bundles.getInvalidBundles();
|
||||
}
|
||||
// in prod, only bundle when someing is missing or invalid
|
||||
let invalidBundles = config.get('optimize.useBundleCache') ? await bundles.getInvalidBundles() : bundles;
|
||||
|
||||
// we might not have any work to do
|
||||
if (!bundles.getIds().length) {
|
||||
if (!invalidBundles.getIds().length) {
|
||||
server.log(
|
||||
['debug', 'optimize'],
|
||||
`All bundles are cached and ready to go!`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue