Skip to content

Commit

Permalink
clients(lr): don't include html report assets in bundle (#9828)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark authored Oct 14, 2019
1 parent 8cfd64b commit da4e851
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build/build-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const locales = fs.readdirSync(__dirname + '/../lighthouse-core/lib/i18n/locales
const isDevtools = file => path.basename(file).includes('devtools');
/** @param {string} file */
const isExtension = file => path.basename(file).includes('extension');
/** @param {string} file */
const isLightrider = file => path.basename(file).includes('lightrider');

const BANNER = `// lighthouse, browserified. ${VERSION} (${COMMIT_HASH})\n`;
const DEBUG = false; // true for sourcemaps
Expand Down Expand Up @@ -71,8 +73,9 @@ async function browserifyFile(entryPath, distPath) {
// Don't include the desktop protocol connection.
bundle.ignore(require.resolve('../lighthouse-core/gather/connections/cri.js'));

// Dont include the stringified report in DevTools.
if (isDevtools(entryPath)) {
// Don't include the stringified report in DevTools - see devtools-report-assets.js
// Don't include in Lightrider - HTML generation isn't supported, so report assets aren't needed.
if (isDevtools(entryPath) || isLightrider(entryPath)) {
bundle.ignore(require.resolve('../lighthouse-core/report/html/html-report-assets.js'));
}

Expand Down

0 comments on commit da4e851

Please sign in to comment.