-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
41 lines (40 loc) · 1.49 KB
/
vite.config.ts
File metadata and controls
41 lines (40 loc) · 1.49 KB
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
40
41
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import svgr from 'vite-plugin-svgr';
import tailwindcss from '@tailwindcss/vite';
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), svgr(), tailwindcss()],
resolve: {
alias: [
{ find: '@', replacement: '/src' },
{ find: '@feature', replacement: '/src/feature' },
{ find: '@pages', replacement: '/src/pages' },
{ find: '@shared', replacement: '/src/shared' },
{ find: '@apis', replacement: '/src/shared/apis' },
{ find: '@assets', replacement: '/src/shared/assets' },
{ find: '@components', replacement: '/src/shared/components' },
{ find: '@constants', replacement: '/src/shared/constants' },
{ find: '@data', replacement: '/src/shared/data' },
{ find: '@hooks', replacement: '/src/shared/hooks' },
{ find: '@layouts', replacement: '/src/shared/layouts' },
{ find: '@routes', replacement: '/src/shared/routes' },
{ find: '@stores', replacement: '/src/shared/stores' },
{ find: '@types', replacement: '/src/shared/types' },
{ find: '@utils', replacement: '/src/shared/utils' },
],
},
assetsInclude: ['**/*.lottie'],
build: {
rollupOptions: {
output: {
assetFileNames: (assetsInfo) => {
if (assetsInfo.name?.endsWith('.lottie')) {
return 'assets/[name]-[hash][extname]';
}
return 'assets/[name]-[hash][extname]';
},
},
},
},
});