mirror of
https://github.com/dpup/meshstream.git
synced 2026-07-03 00:12:02 +02:00
38798de9ca
The previous index.html polyfill set window.__publicField but Vite's dep optimizer pre-bundles in Node.js where that global is never set, so the error persisted. Two-part fix: - vite.config.ts define: rewrite bare __publicField identifiers to globalThis.__publicField (a valid entity name esbuild accepts) - index.html: set globalThis.__publicField using the exact Object.defineProperty signature esbuild expects, before modules run Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
1010 B
HTML
28 lines
1010 B
HTML
<!DOCTYPE html>
|
|
<html lang="en" class="dark">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="description" content="%VITE_SITE_DESCRIPTION%" />
|
|
<title>%VITE_SITE_TITLE%</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Roboto+Mono:wght@400;500&family=Share+Tech+Mono&family=Space+Mono:wght@400;700&family=VT323&display=swap"
|
|
rel="stylesheet">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div id="root"></div>
|
|
<script>
|
|
globalThis.__publicField = function(obj, key, value) {
|
|
Object.defineProperty(obj, typeof key !== 'symbol' ? key + '' : key, {
|
|
configurable: true, enumerable: true, writable: true, value: value
|
|
});
|
|
};
|
|
</script>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
|
|
</html> |