Skip to content

Use with Nuxt #2

@joakimglaving

Description

@joakimglaving

Hello, I have previously been using this with vanilla Vue, but after moving to Nuxt, it doesn't seem to work anymore.

I created a plugin vue-retina.js:

import Vue from 'vue'
import retina from 'retinajs'
import VueRetina from 'vue-retina'

Vue.use(VueRetina, {retina})

And then in nuxt.config.js:

plugins: [
    '~/plugins/vue-retina.js'
]

And in my components I use it as in vanilla Vue:

<img class="slider"
        :src="images[currentNumber % images.length]" v-rjs="2"
/>

But I am only getting the "small" images, not the ones with @2.

Anything I am doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions