A
A
Arioch2019-07-28 00:35:24
Vue.js
Arioch, 2019-07-28 00:35:24

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

1 answer(s)
A
Arioch, 2019-07-28
@arioch77

By googling and poke the solution was found :)

mode: 'spa',
build: {
        publicPath: '/nuxt/'
    },
router: {
        base: './',
        mode: 'hash'
}

with these options, it started right from the folder and successfully assembled in Cordova under virtual Android 5.1
This thing 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 question

Ask a Question

731 491 924 answers to any question