Files
js-dev-onboarding-24-play/vite.config.js
T
24Play-Mykyta-Slobodianiuk 0399551038 feat: update npmrc
2026-06-09 16:59:49 +03:00

30 lines
950 B
JavaScript

import { defineConfig } from "vite";
import { defineConfigTemplate } from "@hitplay/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
},
};
});