-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create flat bundles using rollup #1610
Conversation
9474a9f
to
f61c1d2
Compare
Hey @leebyron @kassens - are you still considering using Rollup to build the new relay packages as discussed in #1590? If so it would be good to get it in before the final 1.0.0 release, otherwise it will be a breaking change. It would removes access to internal modules, e.g. |
Interesting, hadn't thought of that. This would probably be a good thing though as we should expose all necessary things publicly. |
f61c1d2
to
0ad55b8
Compare
I did try to rebase that PR a few months ago and ran into some issues with the dynamic requires of the relay dev tools. Also it would be much more beneficial if the relay source was updated to use ES modules as was done in the React source code. By using |
@robrichard Is that something that can be done iteratively? |
@alloy hard for me to say as I don't know how it would mesh with FB's custom module system. |
I meant more, can this PR continue as-is and discuss ES6 modules as a next step or is blocked by that by now? Also, out of curiosity, does React not use the Haste module system? |
Yes this change would not be blocked by that. React was converted to ES modules in these two PRs: |
Going to close this as there are a few issues with this approach:
|
Updated the gulpfile to use Rollup to generate commonjs and umd bundles as discussed here: #1590. I followed the pattern used by the master branch of React for requiring the dev or prod enabled versions.
I'm being very explicit with regard to what modules are external vs included in the bundles. Let me know there is a different way you would like to handle it.
Also what is the best way I can test that these bundles are built correctly and working as expected?