Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add publicPath type of option to generate #1052
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:
The path should be: /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.
Having the same problem i guess...
i currently have
the thing is
i thought maybe providing a empty string as router base would solve it but it didn't, guess no way of testing it locally !
This might be useful: