The difference between the "ion supply" and "ion assembly browser"

I'm working on a project to create a version of a mobile application for your website (website already deployed and serving), we use the Ionic v1.7.16.

We have considered my supervisors, we can work on a project Ionic, and then also deploy it on the Internet (replacing the previous web version) to be nearly the same interface and the user interface in the mobile and the browser (on the desktop) .

I read about the "Ion platform browser", survived with her a bit, and I have not encountered the problem.

My questions are the same as the title. Is there a difference between "ion supply" and "ion assembly browser"?

My observations:

  • When you add a "browser" as a platform for the project added cordova version of the browser, which, I believe, to prevent inconsistencies between the platforms.
  • I am faced with exactly the same interface and functionality between the "ionic service" and "ion launch the browser." I also used the "python -m SimpleHTTPServer" to view / emulation of how it would look if we ever will use the version of the browser, as well as the same as the previous ones.

Ion platform is still the browser is in beta, and I have not encountered with too many sources, such as, for example, with Ionic platform android. Frequently Asked Questions / sources of Ionic platform for all types of browsers.

+5
source share
2 answers

I work with his first Ionic2 RC1 with the addition of 2 platforms (Android and browser), and I appreciate the differences between these two teams ...

It generates (mine) the following outputs:


  • Serve creates an environment that supports dev support without rebooting
$ ionic serve browser 

myproject_root
| - www (13 MB)
| - assets (1.40 MB)
| - build (11,5 MB)
| | - main.css (729.90 KB)
strong>)
| |)
| - polyfills.js (84.10 KB)
| | - index.html (1.20 KB)
| | - manifest.json (313 B)
| - service-worker.js (3.60 KB)


  1. The assembly creates prod environment
 $ ionic build browser 

myproject_root
| - www (5,60 MB)
| - assets (1.40 MB)
| - build (4.20 MB)
| - main.css (636.70 KB)
strong>)
)
| - polyfills.js (84.10 KB)
| | - index.html (1.20 KB)
| | - manifest.json (313 B)
| - service-worker.js (3.60 KB)

In addition, I find that a different conclusion to deploy:

myproject_root
& emsp; | - platform
& emsp; & emsp; & emsp; | - browser
& emsp; & emsp; & emsp; & emsp; & emsp; | - www (5,70 MB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - assets (1.40 MB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - build (4.20 MB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - main.css (636.70 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | | - main.js (1,50 MB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | | - main.js.map (1,80 MB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - polyfills.js (84.10 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - cordova-js-src (9.40 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - confighelper.js (3.00 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - exec.js (4.70 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - platform.js (1.60 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - plugins (17.60 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & Emsp | | - cordova-plugin-device (5.70 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & Emsp | | - cordova-plugin-splashscreen (6.00 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp | | - cordova-plugin-statusbar (5.10 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & Emsp | | - ion-a plugin keyboard (643 B)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - config.xml (1.40 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - confighelper.js (3.00 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - cordova_plugins.js (2.00 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & | emsp; & emsp; & emsp; & emsp; & | em | | | | - cordova.js (59.00 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - exec.js (4.70 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - platform.js (1.60 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - index.html (1.30 KB)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - manifest.json (313 B)
& emsp; & emsp; & emsp; & emsp; & emsp; & emsp; & emsp; | - service-worker.js (3.60 KB)


Summary

I can deploy all these 3 folders on my web server with different loading times.

Here is a summary of my tests with deactivated caches

  • Ionic service ./www

    • Safari Desktop 10.0.1
      • Loads 10 resources from 4.26 MB for 12.02 seconds.
    • Chrome Desktop 54.0.1
      • Downloads 13 Resource 3.60 MB for 9.06 seconds.
      • The Chrome console says: "main.js: 47628 Native: tried to call t.styleDefault, but Cordoba is not available. Be sure to turn on cordova.js or run it in the device / simulator
  • An initial collection ./www

    • Safari Desktop 10.0.1
      • Downloaded 20 resources from 2.39 MB for 7.08 seconds.
    • Chrome Desktop 54.0.1
      • Downloads 23 Resource 1.80 MB for 5.47 seconds.
      • The Chrome console says "DEVICE IS READY AFTER AFTER 218 ms" and "StatusBar is not supported"
  • An initial assembly ./platforms/browser/www output

    • Safari Desktop 10.0.1
      • Download 10 resources from 2.31 MB in 6.66 seconds.
    • Chrome Desktop 54.0.1
      • Downloads 13 Resource 1.80 MB for 5.09 seconds.
      • Chrome Console says: "main.js: 47628 Rodney tried to call t.styleDefault, but Cordova is unavailable Be sure to include cordova.js or run on the device / simulator.

For reference only: Android.apk weighs 3.70 MB


My conclusions

  • "Ion flow" generates development environment is not ready for production.
  • 'Ionic build' 2 generates slightly different production cut, and only one of them seems to have the right loads the plugins for the native Cordova. If someone from the ionic team reads this can perhaps give us a reason ...

DISCLAIMER: I recently read that the Ionic Team is thinking about changing the rollup for webpack, so all this may change in future versions of the Ionic 2.

+12
source

One of the developers Ionic said that their production for the assembly browser is still in progress. You can see comments Harrington:

https://github.com/ionic-team/ionic/issues/10635

He recommends using npm run build --prod yet.

I would recommend also to minimize compression and adding a version number in the .js files and others to make the browser update.

I notice that Angular 2/4 followed by the production process. I wonder whether there are ng build --prod , which is going Ionic team, and if you can use it to create an ion project anyway.

Angular changes has the advantage that includes index.html random number at the end, forcing users to update browsers files such as main.js , that is critical.

+2
source

All Articles