Fix Vite not inserting defined constants in production.
This commit is contained in:
parent
0da2dba96a
commit
68a0d1da3a
|
@ -7,7 +7,7 @@ export default class SharedFooter extends Component {
|
|||
return html`
|
||||
<footer class="shared-footer">
|
||||
<${ExternalAnchor} text="GitHub" url="https://github.com/Bauke/blink" />
|
||||
<span> v${window.blinkVersion} (${window.blinkCommitHash})</span>
|
||||
<span> v${blinkVersion} (${blinkCommitHash})</span>
|
||||
</footer>
|
||||
`;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
export {};
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
// These are created in `vite.config.ts` and defined by Vite at build time.
|
||||
blinkCommitHash: string;
|
||||
blinkVersion: string;
|
||||
}
|
||||
// These are created in `vite.config.ts` and inserted by Vite at build time.
|
||||
const blinkCommitHash: string;
|
||||
const blinkVersion: string;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue