f851d8b8f2
Electron desktop application for Neverwinter Nights module development. Clone, edit, build, and run a complete Layonara NWNX server with only Docker required. - React 19 + Vite frontend with Monaco editor and NWScript LSP - Node.js + Express backend managing Docker sibling containers - Electron shell with Docker availability check and auto-setup - Builder image auto-builds on first use from bundled Dockerfile - Cross-platform: Windows (.exe), macOS (.dmg), Linux (.AppImage) - Gitea Actions CI for automated release builds
61 lines
1.5 KiB
TypeScript
61 lines
1.5 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import importMetaUrlPlugin from "@codingame/esbuild-import-meta-url-plugin";
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
dedupe: ["vscode"],
|
|
},
|
|
worker: {
|
|
format: "es",
|
|
},
|
|
optimizeDeps: {
|
|
esbuildOptions: {
|
|
plugins: [importMetaUrlPlugin],
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks(id) {
|
|
if (id.includes("@codingame/monaco-vscode-editor-api") ||
|
|
id.includes("@codingame/monaco-vscode-api")) {
|
|
return "monaco-editor";
|
|
}
|
|
if (id.includes("@codingame/")) {
|
|
return "vscode-services";
|
|
}
|
|
if (id.includes("vscode/")) {
|
|
return "vscode-core";
|
|
}
|
|
if (id.includes("lucide-react")) {
|
|
return "icons";
|
|
}
|
|
if (id.includes("node_modules/react/") ||
|
|
id.includes("node_modules/react-dom/") ||
|
|
id.includes("node_modules/react-router")) {
|
|
return "react";
|
|
}
|
|
if (id.includes("monaco-languageclient") ||
|
|
id.includes("vscode-languageclient") ||
|
|
id.includes("vscode-jsonrpc") ||
|
|
id.includes("vscode-languageserver")) {
|
|
return "lsp";
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
"/api": "http://localhost:3000",
|
|
"/ws": {
|
|
target: "ws://localhost:3000",
|
|
ws: true,
|
|
},
|
|
},
|
|
},
|
|
});
|