yulimchen / vue3-h5-template

🌱 A ready-to-use mobile project base template built with the Vue3, Vant, and Vite. | 基于 Vue3、Vite5、TypeScript/JavaScript、Tailwindcss、Vant4,开箱即用的移动端项目基础模板
https://yulimchen.github.io/vue3-h5-template/
MIT License
1k stars 243 forks source link

capacitor #64

Closed lorens-osman-dev closed 3 months ago

lorens-osman-dev commented 3 months ago

can you add ionic capacitor integration, so we can build Android + IOS apps ?

i use ionic vs code extension, when i :

yulimchen commented 3 months ago

I apologize, but there are no plans to integrate Capacitor into this project. However, I have successfully integrated Capacitor into the project following the official documentation: https://capacitorjs.com/solution/vue

8abb6ac34ff2d93e6bcfeb223f52d7a9

lorens-osman-dev commented 3 months ago

Thanks that's works 🙏 , For every one wants to use vue3-h5-template with Ionic vs code extension to convert the project to [android,ios] you will face some problems :

  1. You need node 18.18.2 , use nvm to install and use node 18.18.2.
  2. If you use zsh shell open vs code settings > Extensions > Ionic > shell path > put /bin/zsh , If you don't use zsh ignore this step.
  3. In your project directory in capacitor.config.ts change webDir option from build to dist.
  4. In vite.config.ts remove viteCompression() function because that make errors in android studio .
  5. enjoy !