【发布时间】:2020-12-21 00:18:27
【问题描述】:
前提/我想要实现的目标
我正在 Google App Engine 上以 SSR 模式部署 Nuxt.js 应用。 当时,图标不再显示,所以我希望能够显示它。
yarn build + gcloud app deploy
顺便说一下,用下面的命令显示没有问题。
yarn dev
yarn build + yarn start
对应源码
export default = {
head: {
link: [
{ rel: 'icon',
type: 'image/x-icon', href: 'images/favicon.ico' }
]
}
}(nuxt.config.js)
runtime: nodejs12
instance_class: F2
handlers:
- url: /_nuxt
static_dir: .nuxt/dist/client
secure: always
- url: /(.*\.(gif|png|jpg|ico|txt))$
static_files: static/\1
upload: static/.*\.(gif|png|jpg|ico|txt)$
secure: always
- url: /sw.js
static_files: static/sw.js
upload: static/sw.js
- url: /.*
script: auto
secure: always
- url: /images/favicon.ico
static_files: static/images/favicon.ico
upload: static/images/favicon.ico
- url: /assets
static_dir: assets
env_variables:
HOST: '0.0.0.0'
PORT: '8080'(app.yaml)
我把 favicon.ico 放在了 static/images 目录下。
【问题讨论】:
标签: vue.js google-app-engine google-cloud-platform nuxt.js