From 3b72157e64243b4a37ca86be6c69247023c2ce16 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 12 Oct 2021 16:33:48 +0200 Subject: [PATCH] apparently, package-overrides should use esm otherwise they don't get transpiled for some reason --- scripts/package-overrides/buffer/index.js | 2 +- scripts/package-overrides/safe-buffer/index.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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};