CodePush is having issues and it is affecting my CD pipeline (12kbps downloads)
What would be the challenges in just delivering the js bundle via CDN (e.g. Cloudfront)?
Related
I have a Nuxt 2 app. I'm following the docs to add Capacitor and Android Support.
Everything is fine up to the point of running npx cap add android. The android folder is generated however there are errors in the terminal
√ Adding native android project in android in 342.51ms
√ Syncing Gradle in 944.40μp
√ add in 345.44ms
× copy android - failed!
[error] The web assets directory (.\.nuxt) must contain an index.html file.
It will be the entry point for the web portion of the Capacitor app.
√ Updating Android plugins in 33.68ms
× update android - failed!
[error] Error: ENOENT: no such file or directory, open
'<sourceroot>\android\app\src\main\assets\capacitor.plugins.json'
I’m not running Nuxt in static mode (due to routes and content pulled in dynamically from a CMS). So I run nuxt build which generates the output into a folder named .nuxt by default.
However nuxt build doesn’t create an index.html as an entry point, the nuxt build actually states Entrypoint app = server.js server.js.map. Hence the error above where it can’t find index.html in the .nuxt directory.
Does anyone know a way to resolve this? Or have implemented Capacitor with a Nuxt SPA?
I’ve found resources when using nuxt generate for a static app but not nuxt build for a spa like in my case.
I have a Nuxt2 web app with servers (app server and separate API server), also deployed as an Android app on the Play Store (in alpha testing). Both app flavours look and behave identical and use the same API server, as I desire.
IMHO, in the lifetime of your (universal) app, BOTH build and generate will get leveraged:
build, likely by whatever web app host you use (ie AWS, Heroku, etc), during deployment of the web app.
generate by yourself, when you're ready to submit to the app stores (Apple, Google, etc), making use of Capacitor.
Let's say you have a new feature to add to the app. On that day, you make git commits and increment your version number and when you're ready to deploy the update...
For the web app...
Make commit(s) and version number change
Deploy to your app host, which for most people, will also run the build step for you
The only time I ever run build locally is when I need to make final tests, troubleshoot bugs or make optimizations (e.g. lower final package size).
For the Android or iOS apps...
Make commit(s) and version number change
nuxt generate
Run Capacitor sync (however which way you do it (for me I use: npx cap sync)
Prepare the app store build & submit (however which way you do it)
What nuxt generate does for you, and what Capacitor needs, is a fully rendered snapshot of all your app views together, all at once. It's the equivalent of a web app user opening all your app's views all at once (e.g. 50 browser tabs), pulling all components/styles/etc into their local browser. This fully rendered app state ultimately gets bundled and is what will get submitted to the app store(s).
In Nuxt docs and terminal output, they seem to strongly suggest that if you're using nuxt generate, that you want to be using target: static, however I will say you should completely ignore this advice. Static is what you'd consider if you had a "brochureware" website or some recipe book app that you update once-in-awhile. It goes as far as in the terminal output of nuxt generate, even if I have target: server defined, you'll still see a line saying something along the lines of "Outputting for target static...". Just ignore it.
There is hardly anything static about a typical universal web app.
I personally use target: server with nuxt generate and I haven't seen any problems in the app (web or Android version).
I am currently building expo ios and android locally, but now i am going to use github actions to build it automatically, but when i do, My expo build doesnt read the env, where can i store and secure .env files to make my expo builds have it again?
I have an ionic v4 app that is located in a sub-directory of a much larger mono-repo with various other Angular applications. The mobile app shares some typing files and some services with the other applications.
I was wondering if there is a way to use AppFlow to build the mobile app as a sub-directory of a larger repo or does it need to be it's own repo?
I'm currently developing a web application composed of:
api: an API built with Flask in Python
app: a web app built with vue-cli (based on webpack), and minified with npm run build
I've successfully built the api with an OpenShift Python S2I (source-to-image) image: python-36-rhel7.
I'd like to be able to automatically build the static web app from source and serve it through Nginx or Apache, in a separate app from the same project.
It should:
download the app source from the git repo (context-dir=/app/)
install npm
build it with npm install and npm run build
serve the built html+js+css files
There exist a node.js S2I image but it seems to be more suited for Express.js apps.
What would be the best way to build and serve a minified static web app on OpenShift?
I want to know if there is a way to use Expo SDK without publishing on their servers. To be honest, i want to use my own OTA server with Electrode and a react native app, but, Expo has many helpful native resources (fb ads, SecureStore, admob, push notitications, FileSystem, Asset, Payments and many many more...).
I have read and apparently it is imposible (i guess) use Expo SDK Api without using Exp online services even detaching or ejecting (CRNA) the app.
I apreciate your help
You need to add the follow properties to app.json
"updates": { enabled: false }:
If set to false, your standalone app will never download any code, and will only use code bundled locally on the device.
"assetBundlePatterns": [<insert paths>] (if you use any local assets):
An array of file glob strings which point to assets that will be bundled within your standalone app binary.
If you need to detach (to add other native modules), you need to be on Expo SDK v27:
ExpoKit projects on iOS and Android which were created with exp detach now support bundling your assets inside your native app archive so that your app can launch with no internet.
The Expo team is also planning to add the following features:
modularise the SDK to allow non-Expo projects to use the sdk
allow JS bundle and assets to be self-hosted.