-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
React project as a widget #6008
Comments
The Otherwise it's not currently possible with CRA to emit a single all encompassing file. You can likely achieve this through some webpack configuration, but you would have to eject and would be on your own at that point. |
Just to add to this, I work with a client that had this requirement (which I won't discuss here) and we forked Users have also shared other solutions in here, like this one: |
@ianschmitz I think I didn't clear myself. I need to my app act just like a widget, just like what crisp chat widget does on other websites. I trying to build a CRM and I found nothing to make this happen. |
I understand and agree @miraage, but I think the question is not "Is there a reason?", instead it is "Is this something we can support?". The bigger issue here is that user A may want a single JS file with everything, user B may want one JS and one CSS file, and user C may also need assets separated out. This creates a lot of complexity (and a much larger surface area for issues to arise). So I do understand the desire, but I personally don't see a simple solution here. |
Maybe check out https://github.com/insin/nwb which can do a UMD build it looks like, which may work well for you. |
@ianschmitz I tried your last comment, not worked. I have to write it with vanilla js because react does no support something like that. |
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs. |
This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. |
is there any way to put all build files of React app into one single js file when I run yarn build?
I want to serve my react app from CDN link and I found nothing to explain is it possible or not.
I want to my app work as a widget on other websites.
The text was updated successfully, but these errors were encountered: