Skip to content

Commit

Permalink
yep
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi committed May 29, 2024
1 parent c5c5c2a commit db557ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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) {
Expand Down

0 comments on commit db557ca

Please sign in to comment.