No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Boot files in Quasar 2 without using quasar cli flavor

    Framework
    2
    2
    1298
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      partofthething last edited by partofthething

      I am using the vue cli flavor of Quasar 2 (next) on a project. I want to get a boot file going to load up axios following the boot file example with axios. The problem is, I do not have a quasar.conf.js file, only a quasar-user-options.js file at all, so I cannot add the boot section to it. I tried adding the boot file name to the user options object but that doesn’t seem to be working.

      My quasar-user.options.js file is:

      
      import './styles/quasar.sass'
      import '@quasar/extras/material-icons/material-icons.css'
      import { Notify } from 'quasar'
      import { Cookies } from 'quasar'
      
      // To be used on app.use(Quasar, { ... })
      export default {
        config: {
        },
        plugins: [Notify, Cookies], 
        boot: ['axios']
      }
      

      And my main.js is

      import { createApp } from 'vue'
      import App from './App.vue'
      import { Quasar } from 'quasar'
      import quasarUserOptions from './quasar-user-options'
      import router from './router'
      import store from './store'
      
      const app = createApp(App).use(store).use(router).use(Quasar, quasarUserOptions).mount('#app')
      

      Is it possible to use boot files without using the quasar cli flavor? If not, how else can I achieve what the axios boot file example does (e.g. applying special cookie settings to the axios requests and making it available as this.$axios)?

      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @partofthething last edited by

        @partofthething

        No don’t think so.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post