[Vuejs]-Want to display a favicon on Nuxt.js + Google App Engine

0👍

From the command you are running, you do not appear to be declaring the app.yaml file when deploying the app.

yarn build + gcloud app deploy

Try:

gcloud app deploy app.yaml --project [project-id]

0👍

Please have a look into the App Engine Official Documentation regarding how to set the Favicon.ico

The Vuejs apps are managed as static websites by App Engine as Vue runs on the front-end.

Therefore you would need to configure the app.yaml to use static files.

app.yaml:


env_variables:
  HOST: "0.0.0.0"
  PORT: "8080"

handlers:
- url: /favicon\.ico
  static_files: static/favicon.ico
  upload: static/favicon.ico

- url: /sw.js
  static_files: static/sw.js
  upload: static/sw.js

- url: /static
  static_dir: public

- url: /.*
  script: auto
  secure: always

Please have a look into the following App Engine documentation for static files in App Engine.

Leave a comment