Closed digisocialnet closed 6 years ago
Hi @digisocialnet I don't know if the issue comes from here, but there's a typo in your code; it should be:
export default function ({ store, app }) {
// and then
var tl = new app.$gsap.TimelineMax()
}
Let me know if it does the trick ;)
it didn't but this worked: https://github.com/nuxt/nuxt.js/issues/2347#issuecomment-350235184
I tried using your plugin but am having trouble accessing it from my middleware file. this.$gsap doesn't work and I tried a lot of variations of:
if (process.browser) { require('external_library') }
I tried context too (and process.browser):
`export default function ({ store }) { if (store.state.menuIsActive === !false) { if (process.browser) { var tl = new context.app.$gsap.TimelineMax()
} } `