You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Re-exporting all exports of a module that was compiled with Rollup or Babel and overriding one of the exports causes a TypeError because Reify attempts to set a read-only property in the exports object. Reproduction repository: https://github.com/klaussner/reify-issue-236.
TypeError: Cannot set property existsSync of #<Object> which has only a getter
at Entry.Ep.runGetters (node_modules/reify/lib/runtime/entry.js:165:33)
at Entry.Ep.runSetters (node_modules/reify/lib/runtime/entry.js:211:8)
at Module.runSetters (node_modules/reify/lib/runtime/index.js:115:36)
at Object.extWrap (node_modules/reify/node/compile-hook.js:57:9)
at Object.extManager (node_modules/reify/node/compile-hook.js:19:12)
at Object.manager [as .js] (node_modules/reify/node/wrapper.js:108:20)
at Module.load (internal/modules/cjs/loader.js:628:32)
at Function.Module._load (internal/modules/cjs/loader.js:555:12)
at Module.require (internal/modules/cjs/loader.js:666:19)
at require (internal/modules/cjs/helpers.js:16:16)
The text was updated successfully, but these errors were encountered:
klaussner
changed the title
Overriding Rollup/Babel-compiled export * ... causes error
Overriding Rollup/Babel-compiled export * causes error
Sep 26, 2019
I think we could solve this by also using Object.defineProperty in the runtime code that sets properties on the exports object (potentially only after simple assignment throws).
Re-exporting all exports of a module that was compiled with Rollup or Babel and overriding one of the exports causes a
TypeError
because Reify attempts to set a read-only property in theexports
object. Reproduction repository: https://github.com/klaussner/reify-issue-236.Rollup input:
Rollup output (Babel output is similar):
If the output is used like this with Reify, a
TypeError
is thrown:The text was updated successfully, but these errors were encountered: