From db557ca25b203c88f02f52da5611dc34c7d2684f Mon Sep 17 00:00:00 2001 From: Sid Vishnoi <8426945+sidvishnoi@users.noreply.github.com> Date: Wed, 29 May 2024 16:44:11 +0530 Subject: [PATCH] yep --- src/build.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/build.ts b/src/build.ts index 3b8b668..9293c1e 100644 --- a/src/build.ts +++ b/src/build.ts @@ -171,8 +171,11 @@ async function findAssetsToCopy(source: Input["source"]) { console.groupCollapsed(`[INFO] Finding relevant assets…`); let localAssets: string[] = []; let remoteAssets: URL[] = []; - const { getAllSubResources } = - require("subresources") as typeof import("subresources"); + + Object.assign(process.env, PUPPETEER_ENV); + const { + getAllSubResources, + }: typeof import("subresources") = require("subresources"); const server = await new StaticServer().start(); @@ -181,7 +184,6 @@ async function findAssetsToCopy(source: Input["source"]) { (url: URL) => url.origin === "https://user-images.githubusercontent.com", ]; - Object.assign(process.env, PUPPETEER_ENV); const mainPage = urlToPage(new URL(tmpOutputFile(source), server.url)); const pages = new Set([mainPage]); for (const page of pages) {