-
Notifications
You must be signed in to change notification settings - Fork 0
/
remix.config.js
48 lines (46 loc) · 1.25 KB
/
remix.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
require("dotenv/config");
const wixUrls =
process.env.WIX_URLS?.trim()
.split(/\s+/)
.filter((it) => it) || [];
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
ignoredRouteFiles: ["**/.*", "**/*.module.css"],
// appDirectory: "app",
// assetsBuildDirectory: "public/build",
// serverBuildPath: "build/index.js",
// publicPath: "/build/",
serverModuleFormat: "cjs",
future: {
v2_errorBoundary: true,
v2_meta: true,
v2_normalizeFormMethod: true,
v2_routeConvention: true,
},
serverDependenciesToBundle: [
/uppy/,
/marked/,
/nanoid/,
/exifr/,
/firebase-admin/,
/glideapps/,
/p-retry/,
/p-queue/,
/p-timeout/,
/is-network-error/,
],
routes(defineRoutes) {
return defineRoutes((route) => {
// A common use for this is catchall _routes.
// - The first argument is the React Router path to match against
// - The second is the relative filename of the route handler
for (const path of wixUrls) {
route(path, "wix.tsx", { id: "wix-" + path });
}
route("/__/*", "proxy.tsx");
route("/__/realtime/*", "realtime.tsx");
route("*", "app.tsx", { id: "app" });
route("/", "app.tsx", { id: "home" });
});
},
};