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`
|
return html`
|
||||||
<footer class="shared-footer">
|
<footer class="shared-footer">
|
||||||
<${ExternalAnchor} text="GitHub" url="https://github.com/Bauke/blink" />
|
<${ExternalAnchor} text="GitHub" url="https://github.com/Bauke/blink" />
|
||||||
<span> v${window.blinkVersion} (${window.blinkCommitHash})</span>
|
<span> v${blinkVersion} (${blinkCommitHash})</span>
|
||||||
</footer>
|
</footer>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,9 +2,7 @@
|
||||||
export {};
|
export {};
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
// These are created in `vite.config.ts` and inserted by Vite at build time.
|
||||||
// These are created in `vite.config.ts` and defined by Vite at build time.
|
const blinkCommitHash: string;
|
||||||
blinkCommitHash: string;
|
const blinkVersion: string;
|
||||||
blinkVersion: string;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue