fixed unlighthouse 8
This commit is contained in:
parent
ae98709260
commit
02d5af5a2d
3 changed files with 13 additions and 8 deletions
|
@ -1,8 +1,13 @@
|
|||
export default async () => {
|
||||
const sitemap = await (await fetch('http://website:8081/sitemap-0.xml')).text()
|
||||
/* fetch sitemap from debug container */
|
||||
const sitemap = await (await fetch('http://website:8081/sitemap-0.xml')).text();
|
||||
/* format URLs to work with debug container */
|
||||
const urls = sitemap.match(/<loc>(.*?)<\/loc>/g)!.map(
|
||||
(loc) => loc.replace(/<\/?loc>/g, '').replace(/https:\/\/firq.dev/g, 'http://website:8081')
|
||||
)
|
||||
);
|
||||
/* ensure serve is already "warm", preventing startup lag that reduces performance */
|
||||
for (const url of urls) { await fetch(url) };
|
||||
/* actual config */
|
||||
return {
|
||||
lighthouseOptions: {
|
||||
cache: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue