From aced06ef17d9b1bad8ed1a820a5c76a195e7cecf Mon Sep 17 00:00:00 2001 From: David Mazvovsky Date: Wed, 23 Jun 2021 23:13:08 +0300 Subject: [PATCH 1/2] Update run.js --- src/run.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/run.js b/src/run.js index 59b0258..5ebfddb 100644 --- a/src/run.js +++ b/src/run.js @@ -427,6 +427,7 @@ const minimalcss = async (options) => { const enableServiceWorkers = options.enableServiceWorkers || false; const puppeteerArgs = options.puppeteerArgs || []; const whitelist = options.whitelist || []; + const forcedCssUrls = options.forcedCssUrls || []; const whitelistRules = whitelist.map((rule) => new RegExp(rule)); if (!enableServiceWorkers) { @@ -635,6 +636,9 @@ const minimalcss = async (options) => { allUsedHrefs.push(href); } }); + + AllUsedHrefs.push(...forcedCssUrls) + const allCombinedAst = { type: 'StyleSheet', loc: null, From 939acc986cfdea6981aa66ede21e8097012dcafe Mon Sep 17 00:00:00 2001 From: David Mazvovsky Date: Wed, 23 Jun 2021 23:20:56 +0300 Subject: [PATCH 2/2] Update run.js --- src/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/run.js b/src/run.js index 5ebfddb..c4043f0 100644 --- a/src/run.js +++ b/src/run.js @@ -637,7 +637,7 @@ const minimalcss = async (options) => { } }); - AllUsedHrefs.push(...forcedCssUrls) + allUsedHrefs.push(...forcedCssUrls) const allCombinedAst = { type: 'StyleSheet',