mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Improve WSL detection for vite.config.ts (#5796)
This commit is contained in:
		| @@ -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({ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user