Why isn't window.addeventListener working in plugin file? - Nuxt