mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
build - dont create bundler until task is actually run (#7117)
This commit is contained in:
parent
5363d6aa2a
commit
0dad4db8de
12
gulpfile.js
12
gulpfile.js
@ -543,13 +543,19 @@ function generateBundler (opts, performBundle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function bundleTask (opts) {
|
function bundleTask (opts) {
|
||||||
const bundler = generateBundler(opts, performBundle)
|
let bundler
|
||||||
// output build logs to terminal
|
|
||||||
bundler.on('log', gutil.log)
|
|
||||||
|
|
||||||
return performBundle
|
return performBundle
|
||||||
|
|
||||||
function performBundle () {
|
function performBundle () {
|
||||||
|
// initialize bundler if not available yet
|
||||||
|
// dont create bundler until task is actually run
|
||||||
|
if (!bundler) {
|
||||||
|
bundler = generateBundler(opts, performBundle)
|
||||||
|
// output build logs to terminal
|
||||||
|
bundler.on('log', gutil.log)
|
||||||
|
}
|
||||||
|
|
||||||
let buildStream = bundler.bundle()
|
let buildStream = bundler.bundle()
|
||||||
|
|
||||||
// handle errors
|
// handle errors
|
||||||
|
Loading…
Reference in New Issue
Block a user