Skip to content

Why do we need to pass --bundle-output even though the output is defined from within the webpack config? #166

Answered by zamotany
tom-sherman asked this question in Q&A
Discussion options

You must be logged in to vote

--bundle-output is a destination for main bundle supplied by React Native when building with XCode or Gradle - without it we Re.Pack wouldn't know where to copy main bundle and the application ipa/apk would not include one, which would result in a crash. Additionally, if --assets-dest is not provided, the path will be inferred from --bundle-output.

When you're calling react-native webpack-bundle yourself, you could provide --bundle-output <whatever> and it will be all good. The reason why --bundle-output cannot be replaced with specifying output.path, is that on iOS the path is pointing into internal directories with UUID-like segments, so it's not easy to guess where it will be.

Another …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zamotany
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants