Files
inbuxa-admin/vite.config.ts
T
jcoffey-dev 991912ef4f
ci / build (pull_request) Skipped
ci / publish (pull_request) Skipped
ci / notices (pull_request) Successful in 18s
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 58s
Write .well-known/source into the build
The console's public repository and the commit it was built from, in
the form https://coffeylabs.org/specs/well-known-source/ defines. The
commit comes from INBUXA_REVISION, which the image build passes in; a
build without one writes nothing, and nginx answers that address with a
404 rather than the app. tsconfig.node.json drops source-archive.ts,
gone since #7.
2026-10-28 21:57:30 -07:00

30 lines
1.1 KiB
TypeScript

// SPDX-FileCopyrightText: 2026 Coffey Labs LLC
// SPDX-License-Identifier: AGPL-3.0-only
// defineConfig from vitest/config, not vite, so the `test` section is typed.
import tailwindcss from '@tailwindcss/vite'
import react from '@vitejs/plugin-react'
import path from 'path'
import { configDefaults, defineConfig } from 'vitest/config'
import inbuxa from './inbuxa-version.json' with { type: 'json' }
import { sievePlayground } from './sieve-playground.ts'
import { wellKnownSource } from './well-known-source.ts'
export default defineConfig({
// Relative, so one build works at any mount point (/admin, /account).
base: './',
define: {
// The release version as tags name it (27.1, 27.1.3, 27.1-rc.1). Only
// inbuxa's: package.json's is a leftover nothing shows.
__APP_VERSION__: JSON.stringify(inbuxa.version),
},
plugins: [react(), tailwindcss(), sievePlayground(), wellKnownSource(inbuxa.version)],
resolve: { alias: { '@': path.resolve(import.meta.dirname, './src') } },
test: {
environment: 'happy-dom',
globals: false,
exclude: [...configDefaults.exclude, '**/.ignore/**'],
},
})