-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvite.config.js
223 lines (221 loc) · 8.45 KB
/
vite.config.js
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
import { vitePlugin as remix } from "@remix-run/dev";
import { vercelPreset } from "@vercel/remix/vite";
import tailwind from "@tailwindcss/vite";
const rmx = remix({
presets: [vercelPreset()],
appDirectory: "src",
future: {
v3_fetcherPersist: true,
v3_relativeSplatPath: true,
v3_throwAbortReason: true,
v3_singleFetch: true,
v3_lazyRouteDiscovery: true,
},
routes(defineRoutes) {
return defineRoutes((r) => {
r("", "./pages/home/home.tsx", { index: true });
r("donate/:id", "./pages/donate/index.tsx");
r("donate-fund/:fundId", "./pages/donate-fund/index.tsx");
r("donate-thanks", "./pages/donate-thanks.tsx");
r("form-builder", "./pages/widget/form-builder-layout.tsx", () => {
r("", "./pages/widget/index.ts", {
index: true,
id: "public-form-builder",
});
});
// no robots
r("admin/:id", "./pages/admin/layout.tsx", () => {
r("", "./pages/admin/redirect.ts", { index: true });
r("donations", "./pages/admin/donations/donations.tsx");
r("programs", "./pages/admin/programs/programs.tsx");
r("funds", "./pages/admin/funds/funds.tsx");
r("integrations","./pages/admin/integrations/index.tsx")
r(
"program-editor/:programId",
"./pages/admin/program-editor/program-editor.tsx"
);
r(
"members",
"./pages/admin/members/members.tsx",
{ id: "endow-admins" },
() => {
r("add", "./pages/admin/members/add-form.tsx");
}
);
r("settings", "./pages/admin/settings/form.tsx");
r("edit-profile", "./pages/admin/edit-profile/index.tsx");
r(
"banking",
"./pages/admin/banking/payout-methods/payout-methods.tsx"
);
r("banking/new", "./pages/admin/banking/banking.tsx");
r(
"banking/:bankId",
"./pages/admin/banking/payout-method/payout-method.tsx",
() => {
r(
"delete",
"./pages/admin/banking/payout-method/delete-prompt.tsx"
);
}
);
r("form-builder", "./pages/widget/index.ts", {
id: "admin-form-builder",
});
r("media", "./pages/admin/media/media.tsx", () => {
r("new", "./pages/admin/media/video-new.ts", {
id: "media-new",
});
r(":mediaId", "./pages/admin/media/video-edit.ts", {
id: "media-edit",
});
});
r(
"media/videos",
"./pages/admin/media/videos/videos.tsx",
() => {
r("new", "./pages/admin/media/video-new.ts", {
id: "videos-new",
});
r(":mediaId", "./pages/admin/media/video-edit.ts", {
id: "videos-edit",
});
}
);
r(
"dashboard",
"./pages/admin/dashboard/dashboard.tsx",
{ id: "dashboard" },
() => {
r(
"edit-alloc",
"./pages/admin/dashboard/schedule/edit.tsx"
);
r(
"move-funds",
"./pages/admin/dashboard/move-fund-form.tsx"
);
}
);
});
r("", "./layout/app/layout.tsx", () => {
r("login", "./pages/signin.tsx");
r("signup", "./pages/sign-up/layout.tsx", () => {
r("", "./pages/sign-up/signup-form/signup-form.tsx", { index: true });
r("confirm", "./pages/sign-up/confirm-form/confirm-form.tsx");
r("success", "./pages/sign-up/success.tsx");
});
r("login/reset", "./pages/reset-password/reset-password.tsx");
// no robots
r("dashboard", "./pages/user-dashboard/layout.tsx", () => {
r("", "./pages/user-dashboard/index-route.ts", { index: true });
r("edit-profile", "./pages/user-dashboard/edit-profile/index.ts");
r("settings", "./pages/user-dashboard/settings/settings.tsx");
r("donations", "./pages/user-dashboard/donations/index.tsx", () => {
r(":id", "./components/kyc-form/index.tsx");
});
r("funds", "./pages/user-dashboard/funds/funds.tsx");
});
r("logout", "./pages/logout.ts");
r("nonprofit", "./pages/informational/nonprofit-info/index.ts");
r("donor", "./pages/informational/donor-info/index.ts");
r("wp-plugin", "./pages/informational/wp-plugin.tsx");
r("zapier-integration","./pages/informational/zapier-integration/index.tsx")
r("about-us", "./pages/informational/about/index.tsx");
r("blog", "./pages/blog/posts.tsx");
r("blog/:slug", "./pages/blog/post.tsx");
r("marketplace", "./pages/marketplace/index.tsx", () => {
r("filter", "./pages/marketplace/filter/index.ts");
});
r("marketplace/:id", "./pages/profile/profile.tsx", () => {
r("", "./pages/profile/body/body.tsx", () => {
r("", "./pages/profile/body/general-info/index.ts", {
index: true,
});
r("program/:programId", "./pages/profile/body/program/index.ts");
});
});
r("profile/:id", "./pages/profile/profile-redirect.ts");
r("funds", "./pages/funds/funds.tsx");
r("funds/:fundId", "./pages/funds/fund/index.tsx");
r("funds/:fundId/edit", "./pages/funds/edit-fund/index.ts");
r("funds/new", "./pages/funds/create-fund/index.ts");
r("privacy-policy", "./pages/legal/privacy-policy.tsx");
r("terms-of-use-npo", "./pages/legal/terms-nonprofits.tsx");
r("terms-of-use", "./pages/legal/terms-donors.tsx");
// no robots
r("banking-applications", "./pages/banking-applications/index.ts");
r(
"banking-applications/:id",
"./pages/banking-application/banking-application.tsx",
() => {
r("approve", "./pages/banking-application/verdict-approve.tsx");
r("reject", "./pages/banking-application/verdict-reject.tsx");
r("success", "./pages/banking-application/success-prompt.tsx");
}
);
r("register", "./pages/registration/layout.tsx", () => {
r("", "./pages/registration/sign-up/index.ts", { index: true });
r("success", "./pages/registration/success.tsx");
r("welcome", "./pages/registration/welcome.tsx");
r("resume", "./pages/registration/resume/form.tsx");
r(
":regId",
"./pages/registration/steps/layout.ts",
{ id: "reg$Id" },
() => {
r("sign-result", "./pages/registration/signing-result/index.ts");
r("", "./pages/registration/steps/steps-layout.tsx", () => {
r("", "./pages/registration/steps/steps-index.ts", {
index: true,
});
r("1", "./pages/registration/steps/contact-details/index.tsx");
r("2", "./pages/registration/steps/org-details/index.tsx");
r("3", "./pages/registration/steps/fsa-inquiry/index.ts");
r(
"4",
"./pages/registration/steps/documentation/index.ts",
() => {
r("fsa", "./pages/registration/data/fsa-action.ts");
}
);
r("5", "./pages/registration/steps/banking/index.ts");
r("6", "./pages/registration/steps/dashboard/index.tsx");
});
}
);
});
// no robots
r("applications", "./pages/applications/index.ts");
// no robots
r("applications/:id", "./pages/application/application.tsx", () => {
r(":verdict", "./pages/application/review-route.tsx");
r("success", "./pages/application/success-prompt.tsx");
});
});
r("donate-widget", "./pages/donate-widget/widget-context.tsx", () => {
r(":id", "./pages/donate-widget/index.ts");
r("donate-thanks", "./pages/donate-thanks.tsx", {
id: "widget-donate-thanks",
});
});
});
},
});
export default defineConfig({
base: "/",
build: { outDir: "build", target: "es2022" },
server: { port: 4200 },
plugins: [
process.env.NODE_ENV === "test" ? undefined : rmx,
tsconfigPaths(),
tailwind(),
],
test: {
setupFiles: ["./src/setup-tests.ts"],
environment: "jsdom",
globals: true,
},
});