Answer the question
In order to leave comments, you need to log in
How can I make Nuxt create a static on the generate command that can be run from a folder, and not just through the server?
On the generate command, Nuxt creates a static site that needs to be uploaded to the server.
And how to make it generate a site for local launch? (I need it for Cordova/Android)
Editing the paths by hand /
is ./
not an option, because it has nested file calls there, and in the end it turns out that everything is clear in the console, and the browser shows "This page could not be found" - and I don't telepath)) I don’t understand what exactly he can’t find.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
By googling and poke the solution was found :)
mode: 'spa',
build: {
publicPath: '/nuxt/'
},
router: {
base: './',
mode: 'hash'
}
publicPath: '/nuxt/'
is needed to get away from the underline in the folder name - they write that Cordova does not like them (-:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question