Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mangle: false
});
// Required here since the package isn't installed for non-mobile apps.
var ServiceWorkerPlugin = require('@angular/service-worker').ServiceWorkerPlugin;
// worker.js is needed so it can be copied to dist
var workerJsTree = new BroccoliFunnel(jsTree, {
include: ['vendor/@angular/service-worker/dist/worker.js']
});
/**
* ServiceWorkerPlugin will automatically pre-fetch and cache every file
* in the tree it receives, so it should only receive the app bundle,
* and non-JS static files from the app. The plugin also needs to have
* the worker.js file available so it can copy it to dist.
**/
var swTree = new ServiceWorkerPlugin(BroccoliMergeTrees([
bundleTree,
assetsTree,
workerJsTree
]));
bundleTree = BroccoliMergeTrees([bundleTree, swTree], {
overwrite: true
});
}
return BroccoliMergeTrees([nonJsTree, scriptTree, bundleTree], { overwrite: true });
}
}