DEVDEV

Nuxt.js×Vercel Staticディレクトリが読み込めない対処方法

作成日
2021-02-15
更新日
2021-03-27

"static/**"serverFilesに追記する。

json
{ "version": 2, "builds": [ { "src": "nuxt.config.js", "use": "@nuxtjs/vercel-builder", "config": { "serverFiles": [ "package.json", "static/**" // 追記 ] } } ], "routes": [ { "src": "/_nuxt/.+", "headers": { "Cache-Control": "max-age=31557600" } }, { "src": "/sw.js", "dest": "/_nuxt/static/sw.js", "headers": { "cache-control": "public, max-age=43200, immutable", "Service-Worker-Allowed": "/" } }, { "src": "/(.*)", "dest": "/" } ] }

参考

Deploy Nuxt with Vercel

Related

TAGS

NuxtJS
Vercel

SHARE