nuxt-community / firebase-module

🔥 Easily integrate Firebase into your Nuxt project. 🔥
https://firebase.nuxtjs.org
MIT License
642 stars 98 forks source link

Breaks rest of page when chunk is blocked by ad blocker #290

Closed Cobertos closed 4 years ago

Cobertos commented 4 years ago

It looks like when @nuxtjs/firebase is used with the uBlock Origin ad blocker, it causes a chunk to fail loading and breaks the rest of the page. Is there any way to handle this?

Here's the actual error:

image

runtime.js:919 GET http://localhost:3000/_nuxt/vendors/firebase-analytics.js net::ERR_BLOCKED_BY_CLIENT

client.js?06a0:97 ChunkLoadError: Loading chunk vendors/firebase-analytics failed.
(error: http://localhost:3000/_nuxt/vendors/firebase-analytics.js)
    at Function.requireEnsure [as e] (http://localhost:3000/_nuxt/runtime.js:896:26)
    at Function.fn.e (http://localhost:3000/_nuxt/runtime.js:177:40)
    at _callee$ (webpack-internal:///./.nuxt/firebase-module/main.js:44:40)
    at tryCatch (webpack-internal:///./node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (webpack-internal:///./node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.eval [as next] (webpack-internal:///./node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (webpack-internal:///./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:5:24)
    at _next (webpack-internal:///./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:27:9)
    at eval (webpack-internal:///./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js:34:7)
    at new Promise (<anonymous>)
Cobertos commented 4 years ago

This actually only seems to be an issue in development mode. If you build the production app and deploy it, the request is blocked but the rest of the site does not break.

Probably more of an issue for uBlock Origin's block scripts.