Static GitHub Issues

[1924] window is not defined nuxt.js

prev: Proposal: Add template option for nuxt.config.js
next: How to add code to head tag and </body> tag

how to fix the error? nuxt.config.js

module.exports = {
  plugins: {
     '~plugins/fullpage-vue.js'
  },
build: {
    vendor: [
      'fullpage-vue'
    ]
   ...
}

fullpage-vue.js

import Vue from 'vue'
import VueFullpage from 'fullpage-vue'

if (process.BROWSER_BUILD) {
  Vue.use(VueFullpage)
}

So does not help. I get the error window is not defined node_modules \ fullpage-vue \ dist \ fullpage.js

<!--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/c1719">#c1719</a>)</em></sub></div>