When I connect the vue-scrollto https://rigor789.github.io/vue-scrollto/#/ package to nuxt.config.js, an error occurs cannot/Get Unexpected token import
vue-scrollto.js
import Vue from 'vue' import VueScrollTo from 'vue-scrollto' Vue.use(VueScrollTo)
I tried it differently:
const Vue = require('vue') const VueScrollTo = require('vue-scrollto') Vue.use(VueScrollTo)
nuxt.config.js
modules: { 'vue-scrollto' }
I ask to help understand)
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1209">#c1209</a>)</em></sub></div>