Error text
Capacitor app opens to a white screen. Chrome inspect: Failed to load resource: net::ERR_FILE_NOT_FOUND / Uncaught SyntaxError: Unexpected token '<'
Capacitor app opens to a white screen. Chrome inspect: Failed to load resource: net::ERR_FILE_NOT_FOUND / Uncaught SyntaxError: Unexpected token '<'
The WebView opens index.html, but JS and CSS files fail to load because of wrong paths, or the first script throws.
chrome://inspect on the computer and watch the WebView console./, set base: "./" in the build config so they become relative.androidScheme: "https".build and cap sync.chrome://inspect/#devices
npm run build && npx cap sync android
# vite.config: base: "./"
# capacitor.config: server: { androidScheme: "https" }Keep mobile build settings as a separate profile and test it on a phone each time.
Author and license: Nibras Code