Remove landing page from client repository

This commit is contained in:
Moepchi committed 2026-08-23 10:09:28 +02:00
1 parent 34fdd04c1c
commit e2c67ef23c
13 files changed
+5 -484

No files matched your search

+2 -31
View File
@@ -1,39 +1,10 @@
import { defineConfig, type Plugin } from 'vite'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'node:path'
function landingSlashRedirect(): Plugin {
const redirect = (server: { middlewares: { use: (handler: (req: { url?: string }, res: { statusCode: number; setHeader: (name: string, value: string) => void; end: () => void }, next: () => void) => void) => void } }) => {
server.middlewares.use((req, res, next) => {
if (req.url === '/landing') {
res.statusCode = 302
res.setHeader('Location', '/landing/')
res.end()
return
}
next()
})
}
return {
name: 'landing-slash-redirect',
configureServer: redirect,
configurePreviewServer: redirect,
}
}
// https://vite.dev/config/
export default defineConfig({
plugins: [landingSlashRedirect(), react()],
plugins: [react()],
// Set by the GitHub Pages workflow to the repo subpath (e.g. /webspeak3/);
// the normal Docker build serves from the domain root and leaves this unset.
base: process.env.VITE_BASE_PATH || '/',
build: {
rollupOptions: {
input: {
app: resolve(__dirname, 'index.html'),
landing: resolve(__dirname, 'landing/index.html'),
},
},
},
})