Only use Rollup's CommonJS plugin for "react-art"#18186
Only use Rollup's CommonJS plugin for "react-art"#18186sebmarkbage merged 2 commits intofacebook:masterfrom
Conversation
…ernal dep This avoids it being compiled into the output.
We still need it for the "art" UMD builds but nothing else should have CommonJS dependencies anymore.
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 598f445:
|
|
@NMinhNguyen I merged yours and rebased mine. |
|
I actually realised something.. I remember seeing an issue in .default check? Perhaps there's some CJS setup somewhere that uses webpack (e.g. to serve bundles in the browser via Karma), and it could break. Didn't want to create a separate issue for this (kinda need more time to repro as well), but thought I'd mention it somewhere.
|
Details of bundled changes.Comparing: c26506a...598f445 jest-react
react-debug-tools
Size changes (experimental) |
Details of bundled changes.Comparing: c26506a...598f445 react-debug-tools
jest-react
Size changes (stable) |
This upgrades the shallow renderer dep, and properly make react-debug-tools and jest-react depend on object-assign as an external dependency instead of compiling it in.
This means that "art" is our only CJS dependency that needs to be compiled with Rollup. So we can now disable the CJS plugin for everything else. That ensures we don't reintroduce new CJS dependencies.
I'm hoping to port "art" to ESM or we can just drop the UMD build. Then we can get rid of the plugin completely.