-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
50 lines (49 loc) · 1.21 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
46
47
48
49
50
import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import relay from "vite-plugin-relay";
import { esbuildCommonjs } from "@originjs/vite-plugin-commonjs";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [relay, react()],
test: {
globals: true,
environment: "jsdom",
setupFiles: "@testing-library/jest-dom",
server: {
deps: {
inline: ["@gns-science/toshi-nest", "react-leaflet-fullscreen-plugin", "leaflet"],
},
},
deps: {
optimizer: {
web: {
include: ["@gns-science/toshi-nest", "react-leaflet-fullscreen-plugin", "leaflet"],
},
},
},
// css: {
// include: /.+/,
// },
},
build: {
sourcemap: true,
commonjsOptions: {
transformMixedEsModules: true,
},
},
assetsInclude: ["**/*.md", "**/*.css"],
optimizeDeps: {
include: ["@gns-science/toshi-nest", "react-leaflet-fullscreen-plugin", "leaflet"],
esbuildOptions: {
plugins: [
esbuildCommonjs([
"react-relay",
"@gns-science/toshi-nest",
"d3-array",
"react-leaflet-fullscreen-plugin",
"leaflet",
]),
],
},
},
});