fix: Use bare identifiers for Vite define replacement in service worker
Vite's define option replaces identifiers, not string literals. Changed from '__CACHE_VERSION__' (string) to __CACHE_VERSION__ (identifier) so Vite can properly inject the values at build time. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
f713678328
commit
f5d538ba48
@@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-restricted-globals, no-use-before-define */
|
||||
/* eslint-disable no-restricted-globals, no-use-before-define, no-undef */
|
||||
|
||||
// Build-time injected values
|
||||
const CACHE_VERSION = '__CACHE_VERSION__';
|
||||
const ASSET_ORIGIN = '__ASSET_ORIGIN__';
|
||||
const ASSET_MANIFEST = '__ASSET_MANIFEST__';
|
||||
// Build-time injected values (replaced by Vite define at build time)
|
||||
const CACHE_VERSION = __CACHE_VERSION__;
|
||||
const ASSET_ORIGIN = __ASSET_ORIGIN__;
|
||||
const ASSET_MANIFEST = __ASSET_MANIFEST__;
|
||||
|
||||
const CACHE_NAME = `chatwoot-${CACHE_VERSION}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user