chore: disable pwa module when in preview mode (#483)
parent
2d49074242
commit
3391bce91b
|
@ -5,8 +5,8 @@ const isPreview = process.env.PULL_REQUEST === 'true'
|
||||||
|
|
||||||
const pwa: VitePWANuxtOptions = {
|
const pwa: VitePWANuxtOptions = {
|
||||||
mode: isCI ? 'production' : 'development',
|
mode: isCI ? 'production' : 'development',
|
||||||
// disable PWA only in development
|
// disable PWA only when in preview mode
|
||||||
disable: isDevelopment && process.env.VITE_DEV_PWA !== 'true',
|
disable: isPreview || (isDevelopment && process.env.VITE_DEV_PWA !== 'true'),
|
||||||
scope: '/',
|
scope: '/',
|
||||||
srcDir: './service-worker',
|
srcDir: './service-worker',
|
||||||
filename: 'sw.ts',
|
filename: 'sw.ts',
|
||||||
|
|
Loading…
Reference in New Issue