And now I would like to set the defaultBreakpoint value in accordance with what this function decodes in plugin
media-query.js
import Vue from 'vue';
import VueMq from 'vue-mq';
Vue.use(VueMq, {
breakpoints: { // default breakpoints - customize this
phone: 500,
tablet: 700,
desktop: Infinity
},
defaultBreakpoint: // < How to set it according to the function device-detect.js
})
Thanks to this, we will avoid generating SSR incompatible with the device.
I would also love for this to be configureable and not static.
Perhaps it could support a function? I'm also using Nuxt. Maybe the wrapping Nuxt module could then pass the context to that function.
Hi All
I can't find a solution for this for a long time.
I have serverMiddleware function:
device-detect.js
nuxt.config.js
And now I would like to set the defaultBreakpoint value in accordance with what this function decodes in plugin media-query.js
Thanks to this, we will avoid generating SSR incompatible with the device.
Do you have any ideas how to do it?
Thx