Skip to content

Commit

Permalink
idk
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMcCulloh committed Mar 18, 2024
1 parent 1d0b44c commit dfd86da
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libs/wingsdk/src/shared/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Sandbox {
entrypoint: string,
log?: (message: string) => void
): Promise<Bundle> {
let contents = (await readFile(entrypoint)).toString();
let contents = await readFile(entrypoint, "utf-8");

// log a warning if contents includes __dirname or __filename
if (contents.includes("__dirname") || contents.includes("__filename")) {
Expand All @@ -48,9 +48,7 @@ export class Sandbox {

// wrap contents with a shim that handles the communication with the parent process
// we insert this shim before bundling to ensure source maps are generated correctly
contents = `
"use strict";
${contents}
contents += `
process.on("message", async (message) => {
const { fn, args } = message;
try {
Expand Down

0 comments on commit dfd86da

Please sign in to comment.