vue-match-media icon indicating copy to clipboard operation
vue-match-media copied to clipboard

Added SSR Support

Open jonpreececm opened this issue 4 years ago • 1 comments

Did not update tests, which would be a great addition.

To enable SSR support, the consumer must pass (via options) a string defaultBreakpoint a which to render the page.

Example usage;

import Vue from 'vue';
import MQ from 'vue-match-media/src';

Vue.use(MQ, { defaultBreakpoint: 'only screen and (min-width: 900px)' });

jonpreececm avatar Oct 06 '20 05:10 jonpreececm

@drenglish ,

can we merge this? This solves issues for Nuxt.

import Vue from 'vue'
import MQ from 'vue-match-media'

Vue.use(MQ)

@jonpreececm , thank you for this contrib. Just what I was looking for. I wish I read this before I spent a few hours trying to fix it. :)

Thank you both guys.

avblink avatar Mar 12 '21 11:03 avblink