-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
45 lines (44 loc) · 1.27 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
40
41
42
43
44
45
import path from "path";
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
export default defineConfig({
server: {
port: 3000,
},
plugins: [react()],
css: {
preprocessorOptions: {
scss: {
additionalData: `
@import "./src/scss/utils/fonts.scss";
@import "./src/scss/base/variables.scss";
@import "./src/scss/utils/mixins.scss";
@import "./src/scss/base/partials.scss";
@import "./src/scss/utils/functions.scss";
@import "./src/scss/utils/_breakpoints.scss";
`,
},
},
},
optimizeDeps: {
esbuildOptions: {
loader: {
".glsl": "text",
".frag": "text",
},
},
},
resolve: {
alias: {
utils: path.resolve(__dirname, "./src/utils"),
types: path.resolve(__dirname, "./src/types"),
hooks: path.resolve(__dirname, "./src/hooks"),
pages: path.resolve(__dirname, "./src/pages"),
helpers: path.resolve(__dirname, "./src/helpers"),
contracts: path.resolve(__dirname, "./src/contracts"),
constants: path.resolve(__dirname, "./src/constants"),
components: path.resolve(__dirname, "./src/components"),
contexts: path.resolve(__dirname, "./src/contexts/index.ts"),
},
},
});