-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathremix.config.js
65 lines (65 loc) · 2.53 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var createErrorDialog = function (route, id) {
route("errorDialog", "customRoutes/categories.$category.errorDialog.tsx", {
id: "".concat(id, "ErrorDialog"),
});
};
var createGameDialog = function (route, id) {
route(":gameId", "customRoutes/categories.$category.$gameId.tsx", {
id: "".concat(id, "GameDialog"),
}, function () {
createErrorDialog(route, "".concat(id, "GameDialog"));
});
};
var createSettingsRoutes = function (route, id) {
route("settings", "customRoutes/categories.$category.settings.tsx", {
id: "".concat(id, "Settings"),
}, function () {
route("", "customRoutes/categories.$category.settings._index.tsx", {
index: true,
id: "".concat(id, "SettingsIndex"),
});
route("general", "customRoutes/categories.$category.settings.general.tsx", {
id: "".concat(id, "SettingsGeneral"),
}, function () {
createErrorDialog(route, "".concat(id, "SettingsGeneral"));
});
route("appearance", "customRoutes/categories.$category.settings.appearance.tsx", {
id: "".concat(id, "SettingsAppearance"),
});
});
};
var createCategoriesRoutes = function (route) {
route("categories", "customRoutes/categories.tsx", {}, function () {
route("lastPlayed", "customRoutes/categories.lastPlayed.tsx", function () {
var id = "lastPlayed";
route(":category/:gameId", "customRoutes/categories.$category.$gameId.tsx", {
id: "".concat(id, "GameDialog"),
}, function () {
createErrorDialog(route, "".concat(id, "GameDialog"));
});
createSettingsRoutes(route, id);
createErrorDialog(route, id);
});
route(":category", "customRoutes/categories.$category.tsx", function () {
createGameDialog(route, "category");
createSettingsRoutes(route, "category");
createErrorDialog(route, "category");
});
});
};
var appConfig = {
appDirectory: "app",
serverModuleFormat: "cjs",
routes: function (defineRoutes) {
return defineRoutes(function (route) {
route("/", "customRoutes/_index.tsx", { index: true });
createCategoriesRoutes(route);
createSettingsRoutes(route, "initial");
route("/invalidateCaches", "customRoutes/invalidateCaches.tsx");
});
},
postcss: true,
};
module.exports = appConfig;