3

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

2
  • I think you might be able to control the path through the appBase of /quasar.conf.js check this out: quasar.dev/quasar-cli/quasar-conf-js#property-build
    – bakaDev
    Commented Aug 7, 2021 at 11:52
  • @bakaDev It is not what I am looking for. I need to have just 2 files in my dist folder. 1. index.html 2. a folder that contains everything except index.html Commented Aug 9, 2021 at 14:40

1 Answer 1

4

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', 
            ...
        }
    ...
    }
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.