From 7a9357e7c333d23b885b092aab55d7e4ba8971fd Mon Sep 17 00:00:00 2001 From: Jason Staten Date: Fri, 6 Dec 2019 13:34:50 -0700 Subject: [PATCH] fix(build): disable externalLiveBindings in rollup `export * from '@testing-library/dom'` was causing issues where commonjs imports would cause an error: TypeError: Cannot set property fireEvent of # which has only a getter Due to Rollbar adding a non-configurable property on `exports` Setting `externalLiveBindings: false` uses simple assignment instead of `Object.defineProperty` --- rollup.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 154eab4..7c57dee 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -10,7 +10,12 @@ const pkgDependencies = Object.keys({ export default { input: 'src/index', output: [ - {file: pkg.main, format: 'cjs', sourcemap: true}, + { + file: pkg.main, + format: 'cjs', + sourcemap: true, + externalLiveBindings: false, + }, {file: pkg.module, format: 'es', sourcemap: true}, ], external: [...pkgDependencies],