Skip to content

Instantly share code, notes, and snippets.

@williamchong
Created September 24, 2020 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save williamchong/1a01e4e79a2d26073bf26b1c995ec08e to your computer and use it in GitHub Desktop.
Save williamchong/1a01e4e79a2d26073bf26b1c995ec08e to your computer and use it in GitHub Desktop.
nuxt + express production config
{
"functions": {
"source": "functions",
"predeploy": [
"npm --prefix src run lint",
"npm --prefix src run build",
"rm -rf functions/src/nuxt",
"cp -r src/.nuxt/ functions/lib/nuxt/",
"cp src/nuxt.config.js functions/src",
"cp src/nuxt.config.js functions/lib",
"npm --prefix functions run lint",
"npm --prefix functions run build"
]
},
"hosting": {
"predeploy": [
"rm -rf public/* && mkdir -p public/_nuxt && cp -a src/.nuxt/dist/client/. public/_nuxt && cp -a src/static/. public/ && cp -a public_base/. public/"
],
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"src/node_modules/**"
],
"rewrites": [
{
"source": "/api/**",
"function": "apiHttp"
},
{
"source": "**",
"function": "ssrapp"
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment