vite.config.ts
last analyzed

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 43
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 29
mnd 0
bc 0
fnc 0
dl 0
loc 43
bpm 0
cpm 0
noi 1
c 0
b 0
f 0
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
Require statement not part of import statement.
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