Open valentinoli opened 2 years ago
Thank you for the heads up @valentinoli
Would you mind opening a pull request to update the documentation? https://github.com/nuxt/nuxtjs.org/blob/main/content/en/guides/deployment/heroku-deployment.md
Yes, sure, I can do that
Hello, I noticed that the Deployment section states only deployment for
target: server
is possible via Heroku. Actually, static deployment is possible usingheroku-buildpack-static
in conjunction with the Heroku buildpack for Node.js.The order of buildpacks is this:
First, the Node.js buildpack installs all dependencies with
npm install
and then runs thebuild
script inpackage.json
which should be configured as"build": "nuxt generate"
in thescripts
section ofpackage.json
. This builds the app inside thedist/
folder. Then,heroku-buildpack-static
takes over (it uses nginx). For this buildpack, we need to providestatic.json
in the root. Here is a minimal example: