-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
45 lines (43 loc) · 927 Bytes
/
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
40
41
42
43
44
45
/// <reference types='vitest' />
import path from 'node:path';
import react from '@vitejs/plugin-react';
import sass from 'sass';
import { defineConfig } from 'vite';
import svgr from 'vite-plugin-svgr';
export default defineConfig({
root: __dirname,
cacheDir: './node_modules/.vite/laser-admin',
resolve: {
alias: {
'~styles': path.join(__dirname, './src/styles'),
},
},
css: {
preprocessorOptions: {
scss: {
logger: sass.Logger.silent,
},
},
},
server: {
port: 4200,
host: 'localhost',
},
preview: {
port: 4300,
host: 'localhost',
},
plugins: [react(), svgr()],
// Uncomment this if you are using workers.
// worker: {
// plugins: [ nxViteTsPaths() ],
// },
build: {
outDir: './dist/laser-admin',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
},
},
});