Skip to content

Commit

Permalink
fix: remove CJS compatibility layer
Browse files Browse the repository at this point in the history
  • Loading branch information
MilanKovacic committed Jan 4, 2024
1 parent 6a220c2 commit 055387b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/single-spa-react.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,4 @@ function createSingleSpaRoot(opts) {
return SingleSpaRoot;
}

/**
* If module is running in a CommonJS environment, a compatibility layer for node16 resolution strategy is inserted.
* During transpilation, Rollup correctly inserts the "exports.default", and "exports.__esModule" properties, but they are not respected by some bundlers.
* For more information see https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/CJSOnlyExportsDefault.md
*/
if (typeof module !== "undefined" && module.exports) {
module.exports = singleSpaReact;
module.exports.default = singleSpaReact;
}

export default singleSpaReact;

0 comments on commit 055387b

Please sign in to comment.