Pass code as buffer to swc minify (#29009)
This should fix this: https://github.com/vercel/next.js/pull/28883/checks?check_run_id=3560578176#step:4:353 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes
This commit is contained in:
parent
1f99c3009f
commit
0d0f34ba18
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue