Make production build for web in appflow - ionic-framework

I deployed my app in ionic-appflow. It created a Web Build, it was build using command ionic build and due to which its vendor.js size is 4mb.
I want to create a production build using command like
ionic build --prod or
ionic build --aot
How do we do that in ionic-appflow ? My main concern is vendor.js size.

Related

is there a flutter cli command that installs all sdks for a specific project?

the use case is as follows, I am trying to setup a pipeline for an app we are working on . I have noticed that when running the pipeline most of the time is consumed by downloading the relevant android SDKs for the app. since the allowed cache size is limited I was wondering if is a way to perform everything that is done at the start of flutter build appbundle so I can prepare a specific docker image to be used by the pipeline as the build goes much faster without the downloading of all of these sdks.
using flutter build appbundle is what I am doing right now but it makes the image building process slow.
something like :
flutter prepare
note that simply running pub get is not enough
asking here before I create a feature request on https://github.com/flutter/flutter
looked at flutter cli documentation but couldn't find anything.

Flutter web app not changes in release mode

I make flutter web app and test in debug mode. That is working. Later, Run flutter build web --release this command and then copy files from build/web to the web folder and host on github pages. All is work.
later, I fix some functions and do that above steps again, but nothing changes in github pages. Always show old web, functions. But there is changes in web debug mode. I build with flutter 2.0. How to fix that problem or how should I do?
Do flutter clean. Build for web again and upload the latest build files. Probably your ide created a build from cache
I can solve now...
1.
Clean the build file or type the command flutter clean
2.
Build web release with flutter build web --web-renderer canvaskit --release
3.
Copy all of files and folder inside from web folder inside build folder build/web , to the repo and push again.

IONIC error with NPM (deprecated warning)

in my old ionic version i was able to run and install ionic properly.
but while creating a new project in ionic i get this error
please help me out.
C:\>ionic start
Every great app needs a name!
Please enter the full name of your app. You can change this at any time. To bypass this prompt next time, supply name,
the first argument to ionic start.
? Project name: sumith
Let's pick the perfect starter template!
Starter templates are ready-to-go Ionic apps that come packed with everything you need to build your app. To bypass this
prompt next time, supply template, the second argument to ionic start.
? Starter template: blank
√ Preparing directory .\sumith - done!
√ Downloading and extracting blank starter - done!
Installing dependencies may take several minutes.
* IONIC DEVAPP *
Speed up development with the Ionic DevApp, our fast, on-device testing mobile app
> npm i
npm WARN deprecated circular-json#0.5.9: CircularJSON is in maintenance
only, flatted is its successor.
[ ..............] / fetchMetadata: sill resolveWithNewModule
punycode#2.1.1 checking installable status
set NODE_TLS_REJECT_UNAUTHORIZED=0 before running ionic start.

Ionic - Capacitor build

I am switching my Ionic 3 application to use Capacitor. Is the a way to build the application for production using, as we did before, something like --prod?
Short answer:
In your case, run ionic build --prod, then npx cap copy and finally build the app for production in the native IDE.
Detailed answer:
This is how the Capacitor app development workflow works:
Build the web application
Run npx cap copy
Build the app in the native IDE
Building the web application happens completely separated from Capacitor. You could use any framework in the development process. What only matters is that the builded application is located in the www folder. Using Ionic, you can perform a production build by running ionic build --prod.
Afterwards, Capacitor comes to place and copies the web application in the native IDE projects, where you can perform an app build. Some platform-specific extra settings / steps are required to make the app production ready, but this again doesn't have to do with Capacitor.
Just an update:
In Ionic 4:
To do production build try this below command:
npx ng build --aot=true --configuration="production"
and do
npx cap sync
Hope it helped.

(Ionic Deploy) My App Starting Screen is Very Slow Open

My project is very slowly opening with Ionic Deploy.
Starting time (Without Ionic Deploy): 00:09 seconds
Starting time (With Ionic Deploy): 00:24 seconds
ionic cordova build android --prod --release
Why is this happening? Is this happening to you too?
If you are downloading the deploy update during app startup, that can slow down start times. The Ionic Deploy service must check if there's an update, download the update and then unzip it.
The other options would be to 1) download/unzip the update during app usage and then show users the update next time they open the app or 2) write a custom installation scenario. I would suggestion option 1.
https://ionicframework.com/docs/pro/deploy/