How to build and deploy an Ionic App for Browser.

/ August 30, 2017/ Ionic

(Last Updated On: February 18, 2018) This will work for Ionic 2.x and Ionic 3.x and will make a folder structure ready for deploy.

You need to run (depending on your Ionic Cli version)

ionic cordova build browser --prod

or

ionic build browser --prod

Then you need to use what is inside platforms/browser/www.

Ad:


Be aware that depending of what your App does, you could need to use a HTTP server to be able to see it locally.

There is also a direct way using npm

npm run ionic:build --prod
Spread the love
Subscribe
Notify of
guest
4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Allen
Allen
5 years ago

how to depoly ionic4?

Praveen
Praveen
3 years ago

Hey, so in ionic 4 with angular, I want to build for browser with cordova enable so i can use cordova camera plugin in browser also, is it good to build for browser from ionic cordova build browser --prod instead of ionic build --prod or ng build --prod what are… Read more »