Thanks for the reply, I appreciate it. Part of the problem is that I can’t create a fresh Capacitor project, as I get errors when I run npm init @capacitor/app@latest (as detailed here), so the only way I know how to create any Capacitor project is to convert a Cordova project. I actually would prefer to create a fresh Capacitor project and then copy my files into it. Does a Vite project need to be created before making it a Capacitor project?
Interesting about source vs. output folders. When running npx cap init, which does “Web asset directory” (or “webDir” in capacitor.config.json) refer to? I thought it would be the source, so I accepted the suggested answer of “www”, which is what Cordova uses under the project root. When I run npx vite build www, I’ve assumed the www there is also the source directory, since it won’t build if I run a bare npx vite build– it’s looking for index.html in the project root directory. Where is the output folder set?
How can I tell if Vite is bundling the app? It looks like the build command creates www/dist/, under which are a modified index.html and an assets/ directory with generated assets.
To build and run, should I indeed run npm vite build www&& npx cap sync, followed by either npx cap run android or a run in Android Studio? I couldn’t find a definitive answer for the right sequence.
Thanks a lot! ![]()