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

    [SOLVED] boot file questions

    Framework
    3
    5
    1120
    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.
    • ssuess
      ssuess last edited by ssuess

      After rereading the boot file docs (https://quasar.dev/quasar-cli/boot-files), and looking at my /src/boot folder, I see files that are not in the boot: [] area of quasar.conf.js, but still seem to be working (axios.js among them). Did something change in recent versions and should I make sure any file that is in the boot folder have a corresponding entry in boot: [] area of quasar.conf.js?

      metalsadman 1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Can you post your axios file? Boot files still need to be registered in quasar.conf.js.

        Scott

        1 Reply Last reply Reply Quote 0
        • metalsadman
          metalsadman @ssuess last edited by metalsadman

          @ssuess depends how you are using axios. One boot setting about it, is setting up it’s Vue prototype, so you can use the this.$axios in your sfc’s.

          1 Reply Last reply Reply Quote 1
          • ssuess
            ssuess last edited by

            @metalsadman I think that explains a lot. So if that boot file is included in the conf file, I should no longer have to do an import axios from 'axios' in any file I use axios in? (and instead of writing my calls as axios.get I should be able to use this.$axios.get everywhere?)

            1 Reply Last reply Reply Quote 0
            • s.molinari
              s.molinari last edited by

              Correct. If you bind axios to Vue’s prototype, that is what is possible in your SFCs.

              https://quasar.dev/quasar-cli/boot-files#Axios

              Scott

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