Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: disable output to index.html #141

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,17 +333,17 @@ async function setupGateway(gatewayUrl: string, isLocalPath: boolean, opts: DevO
// log.debug(`Importing packages...`); <-- this used jpsm to create import map for wallet selector
// modifiedHtml = await importPackages(modifiedHtml); // but didn't want it to run each time dev server started, so commented out

// Write the modified HTML to the output path
const outputDir = path.join(opts.output);
const outputPath = path.join(outputDir, 'index.html');
// // Write the modified HTML to the output path
// const outputDir = path.join(opts.output);
// const outputPath = path.join(outputDir, 'index.html');

// Make sure the directory exists
await fs.promises.mkdir(outputDir, { recursive: true });
// // Make sure the directory exists
// await fs.promises.mkdir(outputDir, { recursive: true });

// Write modified html
await fs.promises.writeFile(outputPath, modifiedHtml);
// // Write modified html
// await fs.promises.writeFile(outputPath, modifiedHtml);

log.debug(`Modified HTML written to: ${outputPath}`);
// log.debug(`Modified HTML written to: ${outputPath}`);
} catch (error) {
log.error(`Error setting up gateway: ${error}`);
throw error;
Expand Down
Loading