Boot files in Quasar 2 without using quasar cli flavor
-
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 aquasar-user-options.js
file at all, so I cannot add theboot
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
isimport { 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 asthis.$axios
)? -
No don’t think so.