mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-17 16:50:22 +00:00
AI disclaimer: AI used ## Changes - **vite 7 → 8** - **@vitejs/plugin-react 4 → 6** (peer-requires vite ^8; drops Babel for oxc) - **@tailwindcss/vite 4.1 → 4.3** (first 4.x with a vite ^8 peer range) - `examples/react/vitest.config.ts`: add `resolve.dedupe: ['react', 'react-dom']` : reason explained in comments
22 lines
775 B
TypeScript
22 lines
775 B
TypeScript
import tailwindcss from '@tailwindcss/vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { playwright } from '@vitest/browser-playwright'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
// @vitejs/plugin-react v5+ no longer adds react/react-dom to resolve.dedupe
|
|
// automatically (it did in v4). Without deduping, the linked @uppy/react
|
|
// workspace pulls in a second React copy, causing "Invalid hook call".
|
|
// https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md (v5.0.0)
|
|
resolve: {
|
|
dedupe: ['react', 'react-dom'],
|
|
},
|
|
test: {
|
|
browser: {
|
|
enabled: true,
|
|
provider: playwright(),
|
|
instances: [{ browser: 'chromium' }],
|
|
},
|
|
},
|
|
})
|