Home

Issue: 829

v1.0 plugins: window.onNuxtReady is undefined

[issue link]

Plugins written in the pre 1.0 style - without the exported function runs before window.onNuxtReady is set. Causing onNuxtReady is not a function error messages.

Not sure if this is a design decision but it should be noted as a breaking change.

Works

export default function () {

  if (process.BROWSER_BUILD) {
    console.log(window)
    console.log('onnuxtready defined', window.onNuxtReady)
  }

}

Does not work

if (process.BROWSER_BUILD) {
    console.log(window)
    console.log('onnuxtready not defined', window.onNuxtReady)
  }
This bug report is available on Nuxt.js community (#c710)