mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +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 react from '@vitejs/plugin-react';
|
||||||
import { platform } from 'node:os';
|
import { platform, release } from 'node:os';
|
||||||
import { defineConfig, splitVendorChunkPlugin } from 'vite';
|
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/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user