Hi!
I tried to publish generated Nuxt page to Github pages. It is served from a subdirectory: username.gihub.io/projectname. This causes 404s because asset references start with '/'. For example _nuxt folder:
Failed to load resource: the server responded with a status of 404 (Not Found) /_nuxt/1.nuxt.bundle.5b7c88cf02a549fbbf73.js
The path should be: /projectname/_nuxt/1.nuxt.bundle.5b7c88cf02a549fbbf73.js Or: https://username.gihub.io/projectname/_nuxt/1.nuxt.bundle.5b7c88cf02a549fbbf73.js
I couldn't find any good workaround.
It seems that $ nuxt build has a publicPath option that allows changing the dist folder location. It would be great to have similar option for $nuxt generate also. Default could be '/' but changing it to '/projectname/' would solve the problem in Github pages case. This path should also be prepended in the head section of nuxt.config.js where references to local files are made.
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c917">#c917</a>)</em></sub></div>