-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
[Packager] Publish as a standalone NPM module #363
Comments
We plan to do that, this will solve #341 |
Is this in the works or should I take a look at packaging it? |
@jsierles no. Go for it! |
For the React Native Playground, we're running the packager along side different versions of React Native. Having the packager separate would make it easier to test changes there without having to upgrade react-native itself, and vice-versa. |
I tried to keep it as decoupled as possible, so it shouldn't be too hard. Happy to help. |
Yes, this would be great. I would like to add this as an Xcode build phase, that simply creates a |
Been looking at this. It looks like the packager is already setup to be published as a module. A few doubts:
|
@paramaggarwal By the way, you can bundle that way today using 'react-native bundle' at the root of your project. |
@jsierles Oh, that would be great. I'm seeing this error:
I tried running it inside my project. I also don't see any mention of the bundle command inside the react-native-cli code here. |
It needs to be run from inside your project. The global cli loads a local cli which provides the bundle command. https://github.com/facebook/react-native/blob/master/local-cli/cli.js |
Ah, I see. Unfortunately that |
Yes, we wrote in isolation but it made the syncing process a lot easier to be coupled with react-native. Isolating into it's own repo needs some changes internally. I'm taking some time off in July but I can start looking into this in August. We'll also start using parts of the packager in other projects. |
Sounds good! For now, isolating it in npm would be a good step, I'll be looking at that during July. In general, for rnplay.org we're trying to work out some better solutions for running multiple packagers with multiple entry points each. What would be a good place to discuss this? |
I think here is as good as any. Can you expand on more on your requirement? What can be better about it? |
It may be too ambitious, but we'd like to have a packager running for each version of React Native, and have each one of those serving multiple apps. This works today, by using a single copy of react native at one root, and the applications all at another. But this slows down as more and more application data gets cached in the packager. I also assume that if multiple apps require packages with the same name, they could conflict in the packager cache. This has happened when more than one react-native copy gets installed in one of the app's node_modules. And, as more apps get created with complex dependencies, I figure file watching for entire node_modules trees will not scale. It would be great to know if there's a better way to optimize this use case, and where we should be looking to help improve the packager. A few ideas I had to help this:
|
Good news, we're moving the packager to it's own npm package and github repo. Should release very soon. |
It'd be nice to publish
react-packager
as a standalone NPM module.The text was updated successfully, but these errors were encountered: