update config

This commit is contained in:
SrGooglo 2023-02-24 14:42:28 +00:00
parent 59682c3be1
commit 6386dc3352
2 changed files with 8 additions and 4 deletions

View File

@ -2,6 +2,7 @@ const path = require("path")
const { builtinModules } = require("module")
const aliases = {
"node:buffer": "buffer",
"~": __dirname,
"~/": `${path.resolve(__dirname, "src")}/`,
"@src": path.join(__dirname, "src"),
@ -25,6 +26,11 @@ module.exports = (config = {}) => {
config.server = {}
}
// config.define = {
// "global.Uint8Array": "Uint8Array",
// "process.env.NODE_DEBUG": false,
// }
config.resolve.alias = aliases
config.server.port = process.env.listenPort ?? 8000
config.server.host = "0.0.0.0"

View File

@ -1,10 +1,8 @@
import path from "path"
import getConfig from "./.config.js"
import { defineConfig } from "vite"
import react from "@vitejs/plugin-react"
//import electron, { onstart } from "vite-plugin-electron"
import getConfig from "./.config.js"
export default defineConfig({
plugins: [