release build is not working
See original GitHub issueCurrent Behavior
I’m currently facing some issue with the latest haul & react native in RELEASE BUILD. Please find the attached to understand the issue better.
I followed through the documentation and I managed to run the application in DEBUG BUILD. You can reproduce the issue here: https://github.com/lavaxun/haul-issue.
HOWEVER it’s not working well in the release build. I changed the ‘scheme’ in xcode to be using ‘Release’ and clicked the ‘Run’. Screenshot below shows the error. As you can see the build phase is using CLI_PATH. And it’s giving a long list of errors when executing the bundling script during the build phase. (but the app can still be started despite of the build errors) When I try to use ‘fetch’ to perform HTTP POST. it shows me ‘unsupported bodyinit type’ error.
Another screenshot below shows the bundling script is working fine in the build phase. but without specifying CLI_PATH. And there is no problem in using ‘fetch’ to do HTTP POST.
Expected Behavior
The RELEASE build should be executed without errors. It should work just like the second screenshot above but with CLI_PATH.
Haul Configuration (haul.config.js)
import { createWebpackConfig } from "haul";
export default {
webpack: createWebpackConfig(({ platform }) => ({
entry: `./index.js`
}))
};
Your Environment
software | version |
---|---|
Haul | 1.0.0-rc.9 |
react-native | 0.57.2 |
react-native-navigation | 1.1.491 |
node | 8.11.4 |
yarn | 1.10.1 |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:8 (1 by maintainers)
Top GitHub Comments
@thymikee I have made a repo here https://github.com/lavaxun/haul-issue. would be great if someone can help to investigate it.
I have made a PR https://github.com/callstack/haul/pull/494 to fix the issue by using webpack banner in production environment.