2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

Improve WSL detection for vite.config.ts (#5796)

This commit is contained in:
Oliver
2023-10-26 22:10:02 +11:00
committed by GitHub
parent 53c16510a1
commit 82b376de5b

View File

@ -1,8 +1,12 @@
import react from '@vitejs/plugin-react';
import { platform } from 'node:os';
import { platform, release } from 'node:os';
import { defineConfig, splitVendorChunkPlugin } from 'vite';
const IS_IN_WSL = platform().includes('WSL');
const IS_IN_WSL = platform().includes('WSL') || release().includes('WSL');
if (IS_IN_WSL) {
console.log('WSL detected: using polling for file system events');
}
// https://vitejs.dev/config/
export default defineConfig({