Files
js-dev-onboarding-24-play/vite.config.js
T
24Play-Mykyta-Slobodianiuk 78d85c3799 feat:
-Add UI (Health bars, Resources UI, HUD Interface, Weapon U, Zoombie Invasion progress Indicator)

-Refactor code structure for improved readability and maintainability
2026-06-08 18:33:28 +03:00

30 lines
950 B
JavaScript

import { defineConfig } from "vite";
import { defineConfigTemplate } from "@24tools/ads_common";
import { dependencies } from "./package.json";
const rootDev = "src";
const rootBuild = "src";
export default defineConfig((config) => {
// The template builds the full config (plugins, build, base server.hmr…).
const templateConfig = defineConfigTemplate({
rootDev,
rootBuild,
config,
dependenciesArr: Object.keys(dependencies),
});
return {
...templateConfig,
server: {
...templateConfig.server, // keep the template's settings (hmr, etc.)
// host:true → listen on 0.0.0.0 (all network interfaces), not just
// localhost. Vite then prints a "Network:" URL you can open on a phone
// on the same Wi-Fi. Needs the PC firewall to allow incoming port 5173.
host: true,
port: 5173,
strictPort: true, // fail loudly instead of silently hopping to another port
},
};
});