Is there a support for building ionic 2 for web? SO to exclude cordova dependencies and clean for using as website
This is something weāre investigating down the road, making sure Ionic 2 is setup for things like progressive web apps and possible use cordovaās browser platform to ship browser webapps.
What is the timeline for this. We are really looking forward to do that like right now.
We implemented mobile website using Ionic 1. You can look into www.visitacity.com on mobile web. Itās working fine besides few low priority issues and one major issue: the amount of time it takes for the Ionic bundle to load. Ionic bundle size is ~2.3 MB before compression and itās causing the page to load relatively slow.
We are looking for Angluar 2, Ionic 2 solution tho. As Angluar2 states that one framework for both mobile and web. So it should work on web app right?
gulp build --release
works for me.
Gulp build? Are you using a special build for Ionic 2 app as Ionic CLI should be ionic buildā¦right?
No, but ionic build itself invokes gulp with the gulpfile, among a number of other things. Unfortunately, it requires a platform argument, and defaults to āiosā if one is not supplied.
I havenāt studied everything else that Ionic CLI does, but gulp build has worked for me for building www (it just bypasses all of the Ionic CLI components). Iād love to hear from an expert whether there is anything wrong with this, and if so, what is the ācorrectā way to build a non-platform website version.
well, i could do it by
run ionic serve, then it generates a www Directory, which i used to put on my webserver
i tried it with the cordova geolocation plugin, also seems to workā¦
Hi Yosikal, were you able to optimize the build (minify, uglify, aot etc.)? If so, can you share the steps? Thanks in advance.
So if you upload the www folder to a webserver and you browse it on a mobile phone, native stuff like geolocation and camera work properly?
Sounds very interesting! Iām going to try this ASAP!
Cheers
I would find that supremely surprising.
Itās been a while since the latest response but I find that this build what I need without launching and killing ionic serve:
ionic cordova build browser --release
ionic cordova build browser --release