-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Hello. Thank you for your great work!
Is this package support SSR? I tried install on nuxt 3 but had errors:
ReferenceError: self is not defined
at Object.<anonymous> (/Users/xxx/node_modules/vue3-scroll-spy/dist/index.js:1:200)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:190:29)
at ModuleJob.run (node:internal/modules/esm/module_job:185:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
Here's code for the plugin:
// ./plugins/vue-scroll-spy.ts
import { registerScrollSpy, Easing } from 'vue3-scroll-spy';
export default defineNuxtPlugin((nuxtApp) => {
registerScrollSpy(nuxtApp.vueApp, {
easing: Easing.Cubic.In,
});
});Thank you
Metadata
Metadata
Assignees
Labels
No labels