mattrguerra/cortexmainPrivate on GitHub, published here in full

vite.config.ts

Language TypeScript779 B26 lines

vite.config.ts

  1. import react from '@vitejs/plugin-react'
  2. import { fileURLToPath } from 'node:url'
  3. import { defineConfig } from 'vitest/config'
  4. // Two pages: the main window and the small quick-prompt window.
  5. export default defineConfig({
  6. plugins: [react()],
  7. clearScreen: false,
  8. server: { port: 1420, strictPort: true },
  9. build: {
  10. target: 'safari15',
  11. // The syntax highlighter is most of it; parsed once, from disk, at startup.
  12. chunkSizeWarningLimit: 700,
  13. rollupOptions: {
  14. input: {
  15. main: fileURLToPath(new URL('index.html', import.meta.url)),
  16. quick: fileURLToPath(new URL('quick.html', import.meta.url)),
  17. },
  18. },
  19. },
  20. test: {
  21. environment: 'jsdom',
  22. include: ['src/**/*.test.{ts,tsx}'],
  23. setupFiles: ['src/test-setup.ts'],
  24. },
  25. })