mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Improve WSL detection for vite.config.ts (#5796)
This commit is contained in:
parent
53c16510a1
commit
82b376de5b
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user