diff --git a/packages/next/build/swc/index.js b/packages/next/build/swc/index.js index 3101f08da8bb5..db1e84bab5ba0 100644 --- a/packages/next/build/swc/index.js +++ b/packages/next/build/swc/index.js @@ -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