Fariborz Korevli
Fariborz Korevli

Reputation: 549

how to customize build file locations in Vue Quasar

I need to change the default build file locations in a Vue Quasar app.

it is now like this:

enter image description here

but I need this:

enter image description here

Upvotes: 4

Views: 5138

Answers (1)

Paulo Oliva
Paulo Oliva

Reputation: 231

I've been playing with Django and Quasar, and I was looking for something similar, wanted to place index.html in a Django template folder and js/css in static folder. It seems that build.htmlFilename in the quasar.conf.js configuration file allows for more than just a name but can include path navigation. I've tried the following and it worked fine for me. I got all the assets in the static folder and the index.html in the templates folder.

module.exports = configure(function (ctx) {
    return {
        ...
        build: {
            vueRouterMode: 'hash',
            distDir: '../mainapp/static/mainapp/quasar/', 
            htmlFilename: '../../../templates/mainapp/quasar/index.html', 
            ...
        }
    }
});

In your case you might try something like this:

module.exports = configure(function (ctx) {
    return {
        ...
        build: {
            vueRouterMode: 'hash',
            
            distDir: 'everything', 
            htmlFilename: '../index.html', 
            ...
        }
    ...
    }
});

Upvotes: 4

Related Questions