I would like to know how can I use .env.production mode with ionic serve or ionic build
Asked
Active
Viewed 1,044 times
1
-
you can follow the instructions here - https://cli.vuejs.org/guide/mode-and-env.html – Aaron Saunders Jan 06 '21 at 01:23
-
I have tried using ionic serve --mode production and having .env.production but it doesnt work :( – GianPierre Gálvez Jan 06 '21 at 01:46
-
Can you show us project directory .. it will help us to identify how do mange file structure – Taylor Rahul Jan 06 '21 at 03:36
-
did you try just doing ionic build? also what is the output in the logs when you do ionic serve --mode production – Aaron Saunders Jan 06 '21 at 15:16
-
this is my folder structure https://i.imgur.com/afAYr26.png and this is logs for ionic serve --mode production https://i.imgur.com/P8ulPWG.png – GianPierre Gálvez Jan 06 '21 at 19:31
1 Answers
1
Old post, but for anyone interested, just do
ionic build -- --mode test
It works with snyc too
ionic cap sync -- --mode test

rekam
- 1,061
- 3
- 13
- 31