From b16471c10e2e577470b056868358f82541457073 Mon Sep 17 00:00:00 2001 From: reaper Date: Thu, 15 Dec 2022 22:05:32 +0530 Subject: [PATCH] disable esModule and re-export for nodejs --- 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,