Skip to content

Commit

Permalink
Ignore pako inflate from browserify
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Apr 5, 2017
1 parent 67b99da commit e6aaf49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'use strict';

const Gatherer = require('../gatherer');
const zlib = require('zlib');
const gzip = require('zlib').gzip;

const compressionTypes = ['gzip', 'br', 'deflate'];

Expand Down Expand Up @@ -72,7 +72,7 @@ class ResponseCompression extends Gatherer {
}

return new Promise((resolve, reject) => {
return zlib.gzip(content, (err, res) => {
return gzip(content, (err, res) => {
if (err) {
return reject(err);
}
Expand Down
5 changes: 3 additions & 2 deletions lighthouse-extension/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ gulp.task('browserify-lighthouse', () => {
'app/src/lighthouse-background.js'
], {read: false})
.pipe(tap(file => {
let bundle = browserify(file.path); // , {debug: true})
let bundle = browserify(file.path, {debug: true});
bundle = applyBrowserifyTransforms(bundle);

// lighthouse-background will need some additional transforms, ignores and requires…
Expand All @@ -118,7 +118,8 @@ gulp.task('browserify-lighthouse', () => {
.ignore('source-map')
.ignore('whatwg-url')
.ignore('url')
.ignore('debug/node');
.ignore('debug/node')
.ignore('pako/lib/zlib/inflate.js');

// Expose the audits, gatherers, and computed artifacts so they can be dynamically loaded.
const corePath = '../lighthouse-core/';
Expand Down

0 comments on commit e6aaf49

Please sign in to comment.