From dcc8b60c791f2e58e4c59f1c8a9bf66c193ec0f5 Mon Sep 17 00:00:00 2001 From: reaper Date: Sun, 1 Jan 2023 06:29:17 +0530 Subject: [PATCH] disable esModule and re-export for nodejs (#1486) --- rollup.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index b1e5e3864..54bb0f2c5 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -81,8 +81,9 @@ function createCommonJSConfig(input, output, options) { output: { file: `${output}.js`, format: 'cjs', + esModule: false, outro: options.addModuleExport - ? 'module.exports = exports.default; Object.assign(exports.default, exports);' + ? ';(module.exports = (exports && exports.default) || {}),\n Object.assign(module.exports, exports)' : '', }, external,