-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
82 lines (79 loc) · 1.91 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
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
78
79
80
81
82
// import { remixPlugin as remix } from "@remix-run/dev";
import { remixVitePlugin as remix } from "@remix-run/dev/dist/vite/plugin";
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import SiteMap from "vite-plugin-sitemap";
import { chapterMeta } from "./app/data/chapterMeta";
const CHAPTERS = Object.keys(chapterMeta).map((chapter) => {
return `/chapters/${chapter}`;
});
const robotOption = {
userAgent: "*",
[process.env.NODE_ENV === "production" ? "allow" : "disallow"]: "/",
};
export default defineConfig({
plugins: [
remix({
ignoredRouteFiles: ["**/*.css"],
}),
tsconfigPaths(),
SiteMap({
hostname: "https://dataxdesign.io",
outDir: "public",
exclude: [
"/prototypes/brooks_visualization",
"/prototypes/data_traces_vis_for_jay",
"/prototypes/voyages/conceptual_map",
"/prototypes/brooks_visualization/lib/empty-example",
],
dynamicRoutes: ["/about", ...CHAPTERS],
robots: [robotOption],
}),
],
ssr: {
noExternal: [
"react-dnd",
"react-dnd-html5-backend",
"dnd-core",
"@react-dnd/invariant",
"@react-dnd/asap",
"@react-dnd/shallowequal",
"d3",
"d3-array",
"internmap",
"d3-axis",
"d3-brush",
"d3-chord",
"d3-color",
"d3-contour",
"d3-delaunay",
"d3-dispatch",
"d3-drag",
"d3-dsv",
"d3-ease",
"d3-fetch",
"d3-force",
"d3-format",
"d3-geo",
"d3-hierarchy",
"d3-interpolate",
"d3-path",
"d3-polygon",
"d3-quadtree",
"d3-random",
"d3-scale",
"d3-scale-chromatic",
"d3-selection",
"d3-shape",
"d3-time",
"d3-time-format",
"d3-timer",
"d3-transition",
"d3-zoom",
"delaunator",
"robust-predicates",
"@uidotdev/usehooks",
"remix-utils",
],
},
});