Comments (9)
Hey @vlack-coder
As stated in the docs: Officially, CodePush is only supported if you're not using Code Splitting.
.
We have a guide on how to get it to work here, but I'm not sure how up to date that info is. Give it a try if you haven't already.
Summoning @RafikiTiki as I believe he did some experiments with CodePush
not that long ago
from repack.
Thanks @jbroma . it's working... sorry for being a cry baby here. it's a skill issue, my bad. And the doc kinda added cache invalidation with codepush which confused me
So this is the normal script to run when you push to app center.
appcenter codepush release-react -a ajims119-gmail.com/rapckA
under the scene, it runs node_modules/.bin/react-native bundle
So I created the bundle with repack like the repack Docs suggested using
npx react-native webpack-bundle --platform android --entry-file index.js --bundle-output ./CodePush/index.android.bundle --assets-dest ./CodePush --dev false
Then pushed to appcenter specifying that bundle.
appcenter codepush release -a ajims119-gmail.com/rapckA -c ./CodePush -t 1.0
Thank you for you time
from repack.
I'm providing a repo for reproduction with:
- Fresh React Native installation (0.72.5)
- I installed codepush and React native progress (to show the progress of the OTA downloaded)
Repo - https://github.com/vlack-coder/repack_codepush
Observation
When there's no url in createURLResolver before pushing OTA to app center, it works fine.
from repack.
Hi @jbroma , I'm aware of the guide of using CodePush with Code Splitting but I don't understand step 5 to 7 of the guide
from repack.
@RafikiTiki is there a way to go about this? Thank you
from repack.
@vlack-coder this steps describe a way to invalidate repack cache and cause it to fetch new versions of the scripts instead of reusing the stored ones (cache checks the request parameters when resolving scripts).
Instead of steps mentioned there, you can use shouldUpdateScript
mechanism introduced in #287 (please see the PR description to understand how it works).
from repack.
Note: this is a good candidate for update in the docs
from repack.
@jbroma I'm aware of cache invalidation but in my case, I'm not trying to invalidate the mini app cache.
I'm trying to update the host app bundle with what comes from codepush.
And I think the problem is the command that appcenter uses to create a bundle to push to appcenter...
So it creates this bundle with metro instead of webpack... Because the error I'm getting is of this nature -
ReferenceError: Property '__webpack_require__' doesn't exist, js engine: hermes, stack:
from repack.
@vlack-coder I'm not familiar with CodePush setup tbh, what command are you using?
from repack.
Related Issues (20)
- Issue with node v22.0.0 HOT 4
- Error: repack react native module was not found. Did you forget to update native dependencies? HOT 7
- TypeError: webpackContext.u is not a function (it is undefined)
- Property SentryError doesnt exist HOT 3
- ChunkLoad Error HOT 5
- bundling mini-apps cause crashes HOT 20
- How to config webpack to reuse existing dependencies from the main bundle HOT 4
- How to debug blank screen issue with no error output? HOT 25
- Question: getting the error: "File assets/images/<imageName>@3x.png for ios not found in compilation assets" HOT 5
- ChunkManagerPackage: No value passed for parameter 'p6' HOT 11
- More control over file path and URL for remote assets HOT 14
- Module Federation host app not working [ScriptManager] failed to load script : [NetworkFailure] HOT 6
- Error: Unhandled error. ([ScriptManager] Failed to load script:) HOT 5
- Update docs related to Expo on Usage docs page HOT 1
- Error: Unhandled error. ([ScriptManager] Failed to load script:) HOT 1
- [webpack-cli] RangeError: Maximum call stack size exceeded HOT 5
- Error : TypeError: Cannot read properties of undefined (reading 'forEach') HOT 9
- Error: no such file or directory, open '/Users/x/dev/client/packages/app/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js'" HOT 2
- Error: Property 'SHA1' doesn't exist when using otpauth library HOT 4
- add axios to repack app HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repack.