-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.ts
39 lines (38 loc) · 1.11 KB
/
vite.config.ts
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
32
33
34
35
36
37
38
39
import react from '@vitejs/plugin-react';
import path from 'path';
import { defineConfig } from 'vite';
import eslint from 'vite-plugin-eslint';
import { viteStaticCopy } from 'vite-plugin-static-copy';
export default defineConfig({
plugins: [
react(),
eslint({
include: ['src/**/*.ts', 'src/**/*.tsx'],
emitWarning: true,
emitError: false, // error doesn't block compilation
failOnWarning: false,
failOnError: false, // error doesn't block compilation
}),
viteStaticCopy({
targets: [
{ src: 'src/components/homepage/splashes.json', dest: 'assets' },
{ src: 'src/components/work/work.json', dest: 'assets' },
{ src: 'src/components/assets/publicAssets.json', dest: 'assets' },
{
src: 'src/components/projects/projectDirectory.json',
dest: 'assets',
},
],
}),
],
server: {
port: 3000,
},
resolve: {
alias: {
'@components': path.resolve(__dirname, './src/components'),
'@api': path.resolve(__dirname, './src/api'),
'@global': path.resolve(__dirname, './src/global'),
},
},
});