Closed lupas closed 3 years ago
When setting onFirebaseHosting to true, the service workers try to load the Firebase JS SDK from the nuxt dev server from __/firebase/..., which of course does not exist. It throws the following error message:
onFirebaseHosting
true
__/firebase/...
Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:3333/__/firebase/8.0.1/firebase-app.js' failed to load.
Only set onFirebaseHosting to true in production like so: onFirebaseHosting: process.env.NODE_ENV === 'production'
onFirebaseHosting: process.env.NODE_ENV === 'production'
Either/or:
Fixed, next release coming soon.
Problem
When setting
onFirebaseHosting
totrue
, the service workers try to load the Firebase JS SDK from the nuxt dev server from__/firebase/...
, which of course does not exist. It throws the following error message:Solution
Only set
onFirebaseHosting
totrue
in production like so:onFirebaseHosting: process.env.NODE_ENV === 'production'
ToDo
Either/or: