-
Notifications
You must be signed in to change notification settings - Fork 522
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
How to bundle react.js into the bundle with rollup_bundle? #555
Comments
Hi rules_nodejs, thanks for the awesome rules. If I may interpret what @solomatov and other issues like #532 are saying, I think the rules_nodejs should have some minimal example using React cause it is not straight-forward. In case it is not clear, let me share why it is not so straight-forward. Technically, React is just like other npm packages and you can use rules_nodejs to npm install and bundle application using rollup. React, however, is a bit different than some npm packages because it is isomorphic and uses Now, I wish rules_nodejs to include an example that uses React to dogfood how difficult customizing
Perhaps I am missing context or information. I would appreciate it if you can point to a working example that makes my point invalid. Thanks a lot! |
I agree more flexible Rollup config would be awesome. In the meantime, I worked around this by importing an window.process = { env: { NODE_ENV: 'production' } } |
FYI a configurable rollup_bundle rule is coming soon: #1072 Under production, you'll be able to use rollup-plugin-replace to solve this. |
Thanks for the update! I see the PR has been merged. Has this been released yet? If not, can we start using it with a |
@hgad we haven't released it yet - and it doesn't support |
This issue has been automatically marked as stale because it has not had any activity for 90 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs! |
This issue was automatically closed because it went two weeks without a reply since it was labeled "Can Close?" |
Is there any standard way to embed react.js and other libraries into the resulting bundle like webpack does? Currently, I bundle react separately via globals.
What about other libraries?
It would be nice to provide information on this in the documentation.
The text was updated successfully, but these errors were encountered: