Files
JamBuddy/vite.config.js
T
2026-07-13 21:49:45 +01:00

45 lines
1.5 KiB
JavaScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
react(),
tailwindcss(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['apple-touch-icon.png', 'icon-192.png', 'icon-512.png'],
manifest: {
name: 'JamBuddy — WhatTheFlat',
short_name: 'JamBuddy',
description: 'Real-time key and chord detection for live jams.',
theme_color: '#0f0f0f',
background_color: '#0f0f0f',
display: 'standalone',
orientation: 'any',
start_url: './',
scope: './',
icons: [
{ src: 'icon-192.png', sizes: '192x192', type: 'image/png', purpose: 'any' },
{ src: 'icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'any' },
{ src: 'icon-512-maskable.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
],
},
workbox: {
globPatterns: ['**/*.{js,css,html,svg,png,ico,woff2,webmanifest}'],
navigateFallback: 'index.html',
},
}),
],
base: './', // relative paths so Electron can load files from disk
server: {
// Explicit IPv4 bind: with plain `localhost`, node ≥17 can bind ::1 only,
// which browsers/wait-on may fail to reach (seen on Windows + node 24).
host: '127.0.0.1',
port: 5173,
},
build: {
outDir: 'dist',
},
})