-
-
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
Standardized integration with Cordova #104
Comments
What kind to integration points do you imagine and how would they work? |
I don't see a need for that. |
I'd rather see |
I’m closing because there aren’t any specific suggestions in this thread yet, and I don’t have the necessary context around this. If somebody using Cordova sends a PR demonstrating the kind of integration they would like to see, we can discuss that. Thank you! |
Hi, I'd also like to have some Cordova integration in this project. My current approach is to develop a new app completely as a plain web application and then use a manual like this to deploy it to Cordova. This isn't a good solution, especially when you need using Cordova plugins, e.g. camera, you has to deploy app manually every time, try it on emulator/device and if something is wrong then go again. It would be really nice if this project supports Cordova project starter and we could develop application directly on emulator/device with a live reload. |
I’d appreciate if you could create a new issue with an actionable plan of what is missing in CRA to make it a good experience. |
@gaearon Well, I can do it, but it will be a duplicity - all is described in this thread already. |
Sorry but I don’t see any specific suggestions in this thread besides “add Cordova integration”. I don’t have enough knowledge about it to understand what this entails. If you could provide a list of actionable todos that would enable Cordova integration that would be great! |
@gaearon Well, I don't have either. All I know is it would be nice to have something to automatize these steps - I can't explain it better, sorry. Forget it then. |
@akarienta as I wrote in this issue before, the steps required to make a CRA bundle to work in any cordova app is trivial. Have a post-build step to copy the out folder CRA creates to the cordova www folder. |
You first create the cordova app, then the CRA. Merge both folders, add the change to the package.json I wrote, and your are done. |
@pke I don't think it can work like this - all what is your script doing is copying all files from build folder into www folder when CRA build is complete, nothing more and that's not enough. Did you read this article? There are more steps required. In addition I need to remove the first slashes from generated paths by build (e.g. |
I also didn't think it can work like this, thats why I opened #786 in the first place. But then it turned out to be very easy. No problems with paths here, I just don't ever use absolute paths with a leading slash. |
@pke The paths are generated automatically by whatever-is-inside-CRA (Webpack I guess). E.g. it generates Maybe I don't understand properly a goal of this project - I thought it is a fast project starter and it seems it is much more a tool for beginners whose learn React and need to start fast examples - because you can't reconfigure Webpack, add SASS support etc. |
The issue about non-root paths is here: #1094. It is not specific to Cordova. Please track that issue if you are interested in progress on it. Also as noted in many issues you can add SASS the same way people have been using it for years: by running its watcher. It is just not built-in. Let's keep the discussion in this issue on the topic of Cordova integration needs. |
Oh my, I've just discovered an |
Going to reopen so that we add something to the docs when other issues are solved. |
I'll close because it doesn't appear like a lot of people are hitting this, but feel free to send a doc PR if you'd like!
This is now officially supported if you specify |
Facebook 1.0.10
Hybrid app development is a significant use-case for react (even apart from react-native), but the standard cordova 'approach' uses the cordova CLI tool and build system. Unfortunately you can't have two CLI/build systems operative at once in the stack, so we end up having to choose between a smooth cordova-based stack, or a smooth create-react-app based stack.
EmberCLI (via an addon), Ionic and other CLI-type platforms have integrated cordova support, so you can use their CLI tool and still access cordova features.
It would be great to have basic Cordova integration in create-react-app, ala ionic or embercli. I suspect a small set of Cordova features would cover the majority of simple hybrid app use cases.
The text was updated successfully, but these errors were encountered: