-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts.timestamp-1721670910174-fb280a44e166.mjs
77 lines (77 loc) · 6.16 KB
/
vite.config.ts.timestamp-1721670910174-fb280a44e166.mjs
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// vite.config.ts
import { defineConfig, transformWithEsbuild } from "file:///Users/m31973/Documents/CMS-main/ztmf/ui/node_modules/vite/dist/node/index.js";
import react from "file:///Users/m31973/Documents/CMS-main/ztmf/ui/node_modules/@vitejs/plugin-react-swc/index.mjs";
import EnvironmentPlugin from "file:///Users/m31973/Documents/CMS-main/ztmf/ui/node_modules/vite-plugin-environment/dist/index.js";
import { visualizer } from "file:///Users/m31973/Documents/CMS-main/ztmf/ui/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";
import sass from "file:///Users/m31973/Documents/CMS-main/ztmf/ui/node_modules/sass/sass.node.mjs";
var vite_config_default = defineConfig(({ mode }) => {
return {
define: {
"process.env": {},
global: {},
_global: {}
},
resolve: {
alias: {
"@": "/src",
"npm:": "/node_modules/"
}
},
css: {
preprocessorOptions: {
scss: {
implementation: sass
}
}
},
plugins: [
react(),
EnvironmentPlugin("all"),
// @ts-ignore-next-line
visualizer(),
{
name: "load+transform-js-files-as-jsx",
async transform(code, id) {
if (!id.match(/src\/.*\.js$/)) {
return null;
}
return transformWithEsbuild(code, id, {
loader: "jsx",
jsx: "automatic"
});
}
}
],
server: {
host: true,
port: 5174,
proxy: {
"/graphql": {
target: "http://localhost:3000/",
changeOrigin: true,
secure: false
}
},
watch: {
ignored: ["**/coverage/**"]
}
},
optimizeDeps: {
esbuildOptions: {
loader: {
".js": "jsx"
}
}
},
...mode === "development" && {
build: {
sourcemap: true,
minify: false
}
}
};
});
export {
vite_config_default as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