new forest game project

This commit is contained in:
azykov@mail.ru
2026-09-04 14:12:11 +03:00
parent c4f0fe2a60
commit 75050aaaa3
19 changed files with 1965 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import { fileURLToPath } from 'node:url'
import path from 'node:path'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
const rootDir = path.dirname(fileURLToPath(import.meta.url))
const engineDir = path.resolve(rootDir, '../engine')
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
// Follow the node_modules symlink to the real sibling directory, so Vite's dev server
// watches and transforms the actual engine source files (not a frozen pre-bundled copy).
preserveSymlinks: false,
},
optimizeDeps: {
// Treat @incgame/engine as first-party source, not a vendor dependency to pre-bundle once
// and cache — otherwise edits to the engine package wouldn't trigger HMR until a full
// dev-server restart.
exclude: ['@incgame/engine'],
},
server: {
fs: {
// The engine package lives outside this project's root (a sibling directory reached
// through a node_modules symlink); allow Vite to serve/watch files from there too.
allow: [rootDir, engineDir],
},
},
})