NekR / offline-plugin

Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
MIT License
4.52k stars 295 forks source link

Exclude firebase auth path #472

Closed jeremytenjo closed 4 years ago

jeremytenjo commented 4 years ago

Is is possible to exclude __/auth requests?

jeremytenjo commented 4 years ago

fixed by removing appShell: '/'

jeremytenjo commented 4 years ago

Re-opened as removing appShell: '/' prevents the app from working offline .

jeremytenjo commented 4 years ago

Got it working with Workbox instead


const { GenerateSW } = require('workbox-webpack-plugin')

module.exports = (mode) => {
  const isProd = mode === 'production'

  return isProd
    ? new GenerateSW({
        exclude: [/\.map$/, /\.br$/],
        // for single page apps
        navigateFallback: '/',
        // exclude firebase namespace pages
        navigateFallbackWhitelist: [/^(?!\/__).*/],
      })
    : () => null
}```