Deploy Vite VueJs App to DigitalOcean App Platform

with vue router working

Sep 17, 2022·

1 min read

Resources

  1. Choose code source location
  2. Click the pencil to edit the app as show in the image below Edit app
  3. Edit Resource Type from Web Service to Static Site

Environment Variables

Optional Add env variables for the app

Info

Optional Update App info

Review

Review and Create Resources

Edit App Spec

Note: Required, since it's a SPA, the routes created with Vue Router will not work

  1. Go to the app settings in Digital Ocean App settings
  2. Scroll down to App Spec and click Edit App spec edit
  3. Add index_document: index.html right below the last line with the same indentation as the one before and Save
    # Check the indentation
       routes:
       - path: /
       source_dir: /
       index_document: index.html