Skip to content

Commit

Permalink
Support Buffer results from Webpack loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Aug 1, 2024
1 parent 49c6759 commit fe20916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/turbopack-node/js/src/transforms/webpack-loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ const transform = (
if (!result.result) return reject(new Error("No result from loaders"));
const [source, map] = result.result;
resolve({
source,
source: Buffer.isBuffer(source) ? source.toString("utf8") : source,
map:
typeof map === "string"
? map
Expand Down

0 comments on commit fe20916

Please sign in to comment.