Add dev config for frontend for WSL (#2506)

* Add dev config for frontend

* Update package.json

* Update package.json
This commit is contained in:
மனோஜ்குமார் பழனிச்சாமி
2024-06-19 14:06:06 +05:30
committed by GitHub
parent 3ffcc7157d
commit 92a1eaa866
2 changed files with 5 additions and 0 deletions

View File

@@ -40,6 +40,7 @@
"start": "npm run make-i18n && vite",
"build": "tsc && vite build",
"test": "vitest run",
"dev_wsl": "VITE_WATCH_USE_POLLING=true vite",
"preview": "vite preview",
"make-i18n": "node scripts/make-i18n-translations.cjs",
"prelint": "npm run make-i18n",

View File

@@ -10,6 +10,7 @@ export default defineConfig(({ mode }) => {
VITE_USE_TLS = "false",
VITE_FRONTEND_PORT = "3001",
VITE_INSECURE_SKIP_VERIFY = "false",
VITE_WATCH_USE_POLLING = "false",
} = loadEnv(mode, process.cwd());
const USE_TLS = VITE_USE_TLS === "true";
@@ -34,6 +35,9 @@ export default defineConfig(({ mode }) => {
plugins: [react(), viteTsconfigPaths()],
clearScreen: false,
server: {
watch: {
usePolling: VITE_WATCH_USE_POLLING === "true",
},
port: FE_PORT,
proxy: {
"/api": {