2026-04-05 18:31:16 -07:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
|
import path from 'path'
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react()],
|
|
|
|
|
base: './',
|
|
|
|
|
resolve: {
|
|
|
|
|
alias: {
|
|
|
|
|
'@': path.resolve(__dirname, './src'),
|
2026-05-24 16:32:50 -07:00
|
|
|
// Diagnostic: replace tiny-invariant with a shim that always logs the
|
|
|
|
|
// failure message (the upstream prod build strips it).
|
|
|
|
|
'tiny-invariant': path.resolve(__dirname, './src/utils/tiny-invariant-shim.ts'),
|
2026-04-05 18:31:16 -07:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
build: {
|
|
|
|
|
outDir: 'dist',
|
|
|
|
|
rollupOptions: {
|
|
|
|
|
output: {
|
|
|
|
|
entryFileNames: 'js/editor.js',
|
|
|
|
|
chunkFileNames: 'js/[name].js',
|
|
|
|
|
assetFileNames: (info) =>
|
|
|
|
|
info.name?.endsWith('.css') ? 'css/editor.css' : 'assets/[name][extname]',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
server: {
|
|
|
|
|
port: 5173,
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': 'http://192.168.1.105:8080',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|