mister-webdev /
movie-app
| 1 | import { defineConfig } from 'vite'
|
||
| 2 | import reactRefresh from '@vitejs/plugin-react-refresh' |
||
| 3 | import tsconfigPaths from 'vite-tsconfig-paths' |
||
| 4 | import { visualizer } from 'rollup-plugin-visualizer'
|
||
| 5 | |||
| 6 | /* |
||
| 7 | * https://vitejs.dev/config/ |
||
| 8 | */ |
||
| 9 | |||
| 10 | export default defineConfig({
|
||
| 11 | esbuild: {
|
||
| 12 | jsxInject: `import React from 'react'`, |
||
| 13 | }, |
||
| 14 | plugins: [ |
||
| 15 | reactRefresh({
|
||
| 16 | exclude: [/\.stories\.(t|j)sx?$/, /node_modules/], |
||
| 17 | include: '**/*.tsx', |
||
| 18 | }), |
||
| 19 | tsconfigPaths(), |
||
| 20 | ], |
||
| 21 | resolve: {
|
||
| 22 | alias: {
|
||
| 23 | '@': require('path').resolve(__dirname, 'src'),
|
||
|
0 ignored issues
–
show
introduced
by
Loading history...
|
|||
| 24 | }, |
||
| 25 | }, |
||
| 26 | envPrefix: 'APP', |
||
| 27 | server: {
|
||
| 28 | fs: {
|
||
| 29 | strict: false, |
||
| 30 | }, |
||
| 31 | }, |
||
| 32 | build: {
|
||
| 33 | target: 'esnext', |
||
| 34 | rollupOptions: {
|
||
| 35 | plugins: [ |
||
| 36 | visualizer({
|
||
| 37 | gzipSize: true, |
||
| 38 | brotliSize: true, |
||
| 39 | }), |
||
| 40 | ], |
||
| 41 | }, |
||
| 42 | }, |
||
| 43 | }) |
||
| 44 |