-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathvite.config.js
More file actions
31 lines (27 loc) · 827 Bytes
/
vite.config.js
File metadata and controls
31 lines (27 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// import { defineConfig } from 'vite'
// import react from '@vitejs/plugin-react'
// import tailwindcss from '@tailwindcss/vite'
// // https://vite.dev/config/
// export default defineConfig({
// plugins: [
// tailwindcss(),
// react()
// ],
// })
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'
import path from 'path'
import { fileURLToPath } from 'url'
// ✅ ESM-friendly __dirname workaround
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
export default defineConfig({
plugins: [tailwindcss(), react()],
resolve: {
alias: {
// ✅ Make sure the path points to your .jsx mock file
'next/image': path.resolve(__dirname, 'src/mocks/next-image.jsx'),
},
},
})