znck / lazy-hydration

Lazy Hydration for Vue SSR
https://lazy-hydration.herokuapp.com
MIT License
139 stars 4 forks source link

Add tests #4

Open znck opened 5 years ago

znck commented 5 years ago

Possible testing approach:

Timkor commented 4 years ago

Currently it fails in Nuxt dev mode.

import LazyHydrate from 'lazy-hydration';

const Hydrate = process.env.NODE_ENV === 'production' ? LazyHydrate : {
    functional: true,
    render(c, {slots}) {
        return slots().default;
    }
}

export default Hydrate;

Wrapping it like this did the trick. Any idea?