feat: add footer with version and donate link

This commit is contained in:
Aarnav Tale 2024-12-05 02:32:55 -05:00
parent 33762e53b5
commit 21778a43f1
No known key found for this signature in database
2 changed files with 56 additions and 1 deletions

View file

@ -3,6 +3,7 @@ import { installGlobals } from '@remix-run/node'
import { defineConfig } from 'vite'
import babel from 'vite-plugin-babel'
import tsconfigPaths from 'vite-tsconfig-paths'
import { execSync } from 'node:child_process'
installGlobals()
@ -11,6 +12,12 @@ if (prefix.endsWith('/')) {
throw new Error('Prefix must not end with a slash')
}
// Load the version via git tags
const version = execSync('git describe --tags --always').toString().trim()
if (!version) {
throw new Error('Unable to execute git describe')
}
export default defineConfig(({ isSsrBuild }) => {
// If we have the Headplane entry we build it as a single
// server.mjs file that is built for production server bundle
@ -45,6 +52,9 @@ export default defineConfig(({ isSsrBuild }) => {
return ({
base: `${prefix}/`,
build: isSsrBuild ? { target: 'ES2022' } : {},
define: {
__VERSION__: JSON.stringify(version),
},
plugins: [
remix({
basename: `${prefix}/`,