diff --git a/scripts/package-overrides/buffer/index.js b/scripts/package-overrides/buffer/index.js index 0ed6d01c..2ac44010 100644 --- a/scripts/package-overrides/buffer/index.js +++ b/scripts/package-overrides/buffer/index.js @@ -1,4 +1,4 @@ -module.exports = class Buffer { +export default class Buffer { static isBuffer(array) {return array instanceof Uint8Array;} static from(arrayBuffer) {return arrayBuffer;} static allocUnsafe(size) {return Buffer.alloc(size);} diff --git a/scripts/package-overrides/safe-buffer/index.js b/scripts/package-overrides/safe-buffer/index.js index 93a10446..a1c7d0bb 100644 --- a/scripts/package-overrides/safe-buffer/index.js +++ b/scripts/package-overrides/safe-buffer/index.js @@ -1 +1,2 @@ -module.exports.Buffer = require("buffer"); +import Buffer from "buffer"; +export {Buffer};