Skip to content

Commit

Permalink
Pass code as buffer to swc minify
Browse files Browse the repository at this point in the history
  • Loading branch information
padmaia committed Sep 10, 2021
1 parent c27e3a4 commit 156426e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/next/build/swc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ function toBuffer(t) {
}

export async function minify(src, opts) {
return bindings.minify(src, toBuffer(opts ?? {}))
return bindings.minify(toBuffer(src), toBuffer(opts ?? {}))
}

export function minifySync(src, opts) {
return bindings.minifySync(src, toBuffer(opts ?? {}))
return bindings.minifySync(toBuffer(src), toBuffer(opts ?? {}))
}

module.exports.transform = transform
Expand Down

0 comments on commit 156426e

Please sign in to comment.