-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
43 lines (39 loc) · 1020 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
import react from '@vitejs/plugin-react'
import path from 'node:path'
import { defineConfig } from 'vite'
import svgr from 'vite-plugin-svgr'
export default defineConfig({
plugins: [svgr({ exportAsDefault: true }), react()],
resolve: {
alias: [
{ find: '@', replacement: '/src' },
// {
// find: /^@\//,
// replacement: `${path.resolve(__dirname, 'src')}/`,
// },
// {
// // this is required for the SCSS modules
// find: /^~(.*)$/,
// replacement: '$1',
// },
],
},
define: {
__IS_DEV__: JSON.stringify(true),
__API_URL__: JSON.stringify('http://localhost:8000'),
},
server: {
port: 3000,
},
css: {
preprocessorOptions: {
scss: {
additionalData: `
@import "${path.resolve(__dirname, 'src')}/app/style/mixin";
`,
},
},
},
})
// @import "${path.resolve(__dirname, 'src')}/app/style/mixin";
// @import "${path.resolve(__dirname, 'src')}/app/lib/smartgrid.lib";