diff --git a/.eslintrc.js b/.eslintrc.js
index 4ca926f9..d5815af6 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -79,7 +79,7 @@ module.exports = {
rules: {
"import/no-cycle": "error",
"import/order": [
- "warn",
+ "error",
{
alphabetize: { caseInsensitive: true, order: "asc" },
groups: ["builtin", "external", "internal", "parent", "sibling"],
diff --git a/app/features/dictionary/DictEntryReadings.tsx b/app/features/dictionary/DictEntryReadings.tsx
index 783d8411..aafa2097 100644
--- a/app/features/dictionary/DictEntryReadings.tsx
+++ b/app/features/dictionary/DictEntryReadings.tsx
@@ -17,7 +17,7 @@ import {
import { DictionaryPageFigureWithPriorityUses } from "./getDictionaryPageFigure.server";
import { kanjidicKanaToRomaji } from "./kanjidicKanaToRomaji";
import { QysDialogContent } from "./QysDialogContent";
-import scallopBorder from "./scallopBorder.css?url";
+import scallopBorder from "./scallopBorder.css";
import slideDownStyles from "./slideDown.module.css";
import { transcribeSbgyXiaoyun } from "./transcribeSbgyXiaoyun";
diff --git a/app/features/dictionary/SingleFigureDictionaryEntry.tsx b/app/features/dictionary/SingleFigureDictionaryEntry.tsx
index 1f0bb8d1..954b6f49 100644
--- a/app/features/dictionary/SingleFigureDictionaryEntry.tsx
+++ b/app/features/dictionary/SingleFigureDictionaryEntry.tsx
@@ -28,7 +28,7 @@ import { FigureTags } from "./FigureTags";
import { GlyphsImagesSection } from "./GlyphsImagesSection";
import { GlyphsJson } from "./GlyphsJson";
import { kangxiRadicals } from "./kangxiRadicals";
-import kvgStyles from "./kvg.css?url";
+import kvgStyles from "./kvg.css";
import type { KvgJsonData } from "./KvgJsonData";
import { RadicalSection } from "./RadicalSection";
diff --git a/app/root.tsx b/app/root.tsx
index 486dd99f..177ee073 100644
--- a/app/root.tsx
+++ b/app/root.tsx
@@ -11,7 +11,7 @@ import {
} from "@remix-run/react";
import { getUser } from "~/session.server";
-import stylesheet from "~/tailwind.css?url";
+import stylesheet from "~/tailwind.css";
import Index from "./routes/_index";
diff --git a/app/routes/curate.$courseId.tsx b/app/routes/curate.$courseId.tsx
index 5bff343e..9ca90477 100644
--- a/app/routes/curate.$courseId.tsx
+++ b/app/routes/curate.$courseId.tsx
@@ -5,6 +5,7 @@ import { useActionData, useLoaderData, useSubmit } from "@remix-run/react";
import {
ActionFunctionArgs,
LoaderFunctionArgs,
+ json,
} from "@remix-run/server-runtime";
import {
Fragment,
@@ -83,9 +84,9 @@ export const action = async ({ request }: ActionFunctionArgs) => {
},
});
- return {
+ return json({
courseId,
- };
+ });
};
export const loader = async ({ request, params }: LoaderFunctionArgs) => {
@@ -120,7 +121,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
textGroupsCount,
} = await getCurationState(courseId, page);
- return {
+ return json({
course,
page,
seenTexts,
@@ -147,7 +148,7 @@ export const loader = async ({ request, params }: LoaderFunctionArgs) => {
},
})
.then((figures) => figures.map((f) => f.key)),
- };
+ });
};
export default function CuratePage() {
diff --git a/app/routes/dict.$figureKey.tsx b/app/routes/dict.$figureKey.tsx
index d4b0ca3b..ed1b9006 100644
--- a/app/routes/dict.$figureKey.tsx
+++ b/app/routes/dict.$figureKey.tsx
@@ -21,7 +21,7 @@ import {
links as kvgLinks,
SingleFigureDictionaryEntry,
} from "~/features/dictionary/SingleFigureDictionaryEntry";
-import css from "~/features/dictionary/styles.css?url";
+import css from "~/features/dictionary/styles.css";
import { getLatestFigureId } from "~/models/figure";
type LoaderData =
diff --git a/app/routes/dict.middle-chinese-pronunciation.tsx b/app/routes/dict.middle-chinese-pronunciation.tsx
index 21cf888f..2957265f 100644
--- a/app/routes/dict.middle-chinese-pronunciation.tsx
+++ b/app/routes/dict.middle-chinese-pronunciation.tsx
@@ -13,7 +13,7 @@ import {
Fragment,
} from "react";
-import css from "app/features/dictionary/middle-chinese.css?url";
+import css from "app/features/dictionary/middle-chinese.css";
import { MiddleChineseLink } from "~/components/AppLink";
import DictionaryLayout from "~/components/DictionaryLayout";
import { useTocHighlighting } from "~/components/useTocHighlighting";
diff --git a/app/routes/dict.middle-chinese.tsx b/app/routes/dict.middle-chinese.tsx
index 7a7a9bcc..3b3538d5 100644
--- a/app/routes/dict.middle-chinese.tsx
+++ b/app/routes/dict.middle-chinese.tsx
@@ -8,7 +8,7 @@ import {
} from "~/components/AppLink";
import DictionaryLayout from "~/components/DictionaryLayout";
import { useTocHighlighting } from "~/components/useTocHighlighting";
-import css from "~/features/dictionary/middle-chinese.css?url";
+import css from "~/features/dictionary/middle-chinese.css";
import { G } from "~/features/dictionary/QysHints";
import { NavLi } from "~/features/qysInfo/NavLi";
import screenshot1 from "~/images/mc-screenshot-1.png";
diff --git a/package-lock.json b/package-lock.json
index e20178c4..f39dc197 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -10,6 +10,7 @@
"@isaacs/express-prometheus-middleware": "^1.2.1",
"@popperjs/core": "^2.11.8",
"@prisma/client": "^5.5.2",
+ "@remix-run/css-bundle": "^2.15.0",
"@remix-run/express": "^2.15.0",
"@remix-run/node": "^2.15.0",
"@remix-run/react": "^2.15.0",
@@ -85,9 +86,9 @@
"prettier-plugin-tailwindcss": "^0.5.7",
"prisma": "^5.7.0",
"start-server-and-test": "^2.0.1",
- "tailwindcss": "^3.4.15",
+ "tailwindcss": "^3.3.3",
"vite": "^4.5.5",
- "vite-tsconfig-paths": "^4.3.2",
+ "vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.34.6"
},
"engines": {
@@ -1968,6 +1969,14 @@
"@prisma/debug": "5.7.0"
}
},
+ "node_modules/@remix-run/css-bundle": {
+ "version": "2.15.0",
+ "resolved": "https://registry.npmjs.org/@remix-run/css-bundle/-/css-bundle-2.15.0.tgz",
+ "integrity": "sha512-Jf4AHdObVyGbPf5V4rIB7cRLdluFkzKvrHglDUrrH1KvbD+jNulQt+Kz3bjbEeEdyUSK+LdVMD2E2zOx+ZNXyg==",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
"node_modules/@remix-run/dev": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/@remix-run/dev/-/dev-2.15.0.tgz",
@@ -5431,11 +5440,11 @@
}
},
"node_modules/braces": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
- "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dependencies": {
- "fill-range": "^7.1.1"
+ "fill-range": "^7.0.1"
},
"engines": {
"node": ">=8"
@@ -5761,9 +5770,15 @@
}
},
"node_modules/chokidar": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
- "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
@@ -5776,9 +5791,6 @@
"engines": {
"node": ">= 8.10.0"
},
- "funding": {
- "url": "https://paulmillr.com/funding/"
- },
"optionalDependencies": {
"fsevents": "~2.3.2"
}
@@ -8350,9 +8362,9 @@
"dev": true
},
"node_modules/fast-glob": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
- "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
+ "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
"dev": true,
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
@@ -8445,9 +8457,9 @@
}
},
"node_modules/fill-range": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
- "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dependencies": {
"to-regex-range": "^5.0.1"
},
@@ -10065,9 +10077,9 @@
"dev": true
},
"node_modules/jiti": {
- "version": "1.21.6",
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.6.tgz",
- "integrity": "sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w==",
+ "version": "1.21.0",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
+ "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
"dev": true,
"bin": {
"jiti": "bin/jiti.js"
@@ -13639,27 +13651,21 @@
}
},
"node_modules/postcss-load-config": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.2.tgz",
- "integrity": "sha512-bSVhyJGL00wMVoPUzAVAnbEoWyqRxkjv64tUl427SKnPrENtq6hJwUojroMz2VB+Q1edmi4IfrAPpami5VVgMQ==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-4.0.1.tgz",
+ "integrity": "sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==",
"dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
"dependencies": {
- "lilconfig": "^3.0.0",
- "yaml": "^2.3.4"
+ "lilconfig": "^2.0.5",
+ "yaml": "^2.1.1"
},
"engines": {
"node": ">= 14"
},
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
"peerDependencies": {
"postcss": ">=8.0.9",
"ts-node": ">=9.0.0"
@@ -13673,18 +13679,6 @@
}
}
},
- "node_modules/postcss-load-config/node_modules/lilconfig": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.2.tgz",
- "integrity": "sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==",
- "dev": true,
- "engines": {
- "node": ">=14"
- },
- "funding": {
- "url": "https://github.com/sponsors/antonk52"
- }
- },
"node_modules/postcss-modules": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-6.0.0.tgz",
@@ -13764,34 +13758,28 @@
}
},
"node_modules/postcss-nested": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.2.0.tgz",
- "integrity": "sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-6.0.1.tgz",
+ "integrity": "sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==",
"dev": true,
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "github",
- "url": "https://github.com/sponsors/ai"
- }
- ],
"dependencies": {
- "postcss-selector-parser": "^6.1.1"
+ "postcss-selector-parser": "^6.0.11"
},
"engines": {
"node": ">=12.0"
},
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
"peerDependencies": {
"postcss": "^8.2.14"
}
},
"node_modules/postcss-selector-parser": {
- "version": "6.1.2",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
- "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
+ "version": "6.0.13",
+ "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
+ "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
"dev": true,
"dependencies": {
"cssesc": "^3.0.0",
@@ -15629,14 +15617,14 @@
}
},
"node_modules/sucrase": {
- "version": "3.35.0",
- "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.35.0.tgz",
- "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==",
+ "version": "3.34.0",
+ "resolved": "https://registry.npmjs.org/sucrase/-/sucrase-3.34.0.tgz",
+ "integrity": "sha512-70/LQEZ07TEcxiU2dz51FKaE6hCTWC6vr7FOk3Gr0U60C3shtAN+H+BFr9XlYe5xqf3RA8nrc+VIwzCfnxuXJw==",
"dev": true,
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.2",
"commander": "^4.0.0",
- "glob": "^10.3.10",
+ "glob": "7.1.6",
"lines-and-columns": "^1.1.6",
"mz": "^2.7.0",
"pirates": "^4.0.1",
@@ -15647,7 +15635,17 @@
"sucrase-node": "bin/sucrase-node"
},
"engines": {
- "node": ">=16 || 14 >=14.17"
+ "node": ">=8"
+ }
+ },
+ "node_modules/sucrase/node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
}
},
"node_modules/sucrase/node_modules/commander": {
@@ -15659,6 +15657,38 @@
"node": ">= 6"
}
},
+ "node_modules/sucrase/node_modules/glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ },
+ "engines": {
+ "node": "*"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/sucrase/node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
"node_modules/supports-color": {
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
@@ -15697,33 +15727,33 @@
"integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew=="
},
"node_modules/tailwindcss": {
- "version": "3.4.15",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.4.15.tgz",
- "integrity": "sha512-r4MeXnfBmSOuKUWmXe6h2CcyfzJCEk4F0pptO5jlnYSIViUkVmsawj80N5h2lO3gwcmSb4n3PuN+e+GC1Guylw==",
+ "version": "3.3.5",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
+ "integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
"dev": true,
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2",
- "chokidar": "^3.6.0",
+ "chokidar": "^3.5.3",
"didyoumean": "^1.2.2",
"dlv": "^1.1.3",
- "fast-glob": "^3.3.2",
+ "fast-glob": "^3.3.0",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
- "jiti": "^1.21.6",
+ "jiti": "^1.19.1",
"lilconfig": "^2.1.0",
- "micromatch": "^4.0.8",
+ "micromatch": "^4.0.5",
"normalize-path": "^3.0.0",
"object-hash": "^3.0.0",
- "picocolors": "^1.1.1",
- "postcss": "^8.4.47",
+ "picocolors": "^1.0.0",
+ "postcss": "^8.4.23",
"postcss-import": "^15.1.0",
"postcss-js": "^4.0.1",
- "postcss-load-config": "^4.0.2",
- "postcss-nested": "^6.2.0",
- "postcss-selector-parser": "^6.1.2",
- "resolve": "^1.22.8",
- "sucrase": "^3.35.0"
+ "postcss-load-config": "^4.0.1",
+ "postcss-nested": "^6.0.1",
+ "postcss-selector-parser": "^6.0.11",
+ "resolve": "^1.22.2",
+ "sucrase": "^3.32.0"
},
"bin": {
"tailwind": "lib/cli.js",
@@ -15745,19 +15775,6 @@
"node": ">=10.13.0"
}
},
- "node_modules/tailwindcss/node_modules/micromatch": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
- "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
- "dev": true,
- "dependencies": {
- "braces": "^3.0.3",
- "picomatch": "^2.3.1"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
"node_modules/tapable": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
@@ -16201,18 +16218,18 @@
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA=="
},
"node_modules/tsconfck": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.4.tgz",
- "integrity": "sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-2.1.2.tgz",
+ "integrity": "sha512-ghqN1b0puy3MhhviwO2kGF8SeMDNhEbnKxjK7h6+fvY9JAxqvXi8y5NAHSQv687OVboS2uZIByzGd45/YxrRHg==",
"dev": true,
"bin": {
"tsconfck": "bin/tsconfck.js"
},
"engines": {
- "node": "^18 || >=20"
+ "node": "^14.13.1 || ^16 || >=18"
},
"peerDependencies": {
- "typescript": "^5.0.0"
+ "typescript": "^4.3.5 || ^5.0.0"
},
"peerDependenciesMeta": {
"typescript": {
@@ -16940,14 +16957,14 @@
}
},
"node_modules/vite-tsconfig-paths": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz",
- "integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==",
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.2.1.tgz",
+ "integrity": "sha512-GNUI6ZgPqT3oervkvzU+qtys83+75N/OuDaQl7HmOqFTb0pjZsuARrRipsyJhJ3enqV8beI1xhGbToR4o78nSQ==",
"dev": true,
"dependencies": {
"debug": "^4.1.1",
"globrex": "^0.1.2",
- "tsconfck": "^3.0.3"
+ "tsconfck": "^2.1.0"
},
"peerDependencies": {
"vite": "*"
diff --git a/package.json b/package.json
index d357825e..41df123a 100644
--- a/package.json
+++ b/package.json
@@ -3,8 +3,12 @@
"private": true,
"sideEffects": false,
"scripts": {
- "build": "remix vite:build",
- "dev": "remix vite:dev",
+ "build": "run-s build:*",
+ "build:remix": "remix build",
+ "build:server": "esbuild --platform=node --format=cjs ./server.ts --outdir=build --bundle --external:fsevents",
+ "dev": "run-p dev:*",
+ "dev:server": "cross-env NODE_ENV=development npm run build:server -- --watch",
+ "dev:remix": "remix dev --manual -c \"node --require ./mocks ./build/server.js\"",
"docker": "docker compose up -d",
"format:w": "prettier --write .",
"prettier": "prettier",
@@ -13,7 +17,7 @@
"lint": "npm run lint:only -- .",
"setup": "prisma generate && prisma migrate deploy && prisma db seed",
"seed": "prisma db seed",
- "start": "remix-serve ./build/server/index.js",
+ "start": "cross-env NODE_ENV=production node ./build/server.js",
"start:mocks": "cross-env NODE_ENV=production node --require ./mocks --require dotenv/config ./build/server.js",
"test": "vitest",
"test:e2e:dev": "start-server-and-test dev http://localhost:3000 \"npx cypress open\"",
@@ -34,6 +38,7 @@
"@isaacs/express-prometheus-middleware": "^1.2.1",
"@popperjs/core": "^2.11.8",
"@prisma/client": "^5.5.2",
+ "@remix-run/css-bundle": "^2.15.0",
"@remix-run/express": "^2.15.0",
"@remix-run/node": "^2.15.0",
"@remix-run/react": "^2.15.0",
@@ -69,8 +74,6 @@
"devDependencies": {
"@faker-js/faker": "^8.2.0",
"@remix-run/dev": "^2.15.0",
- "@remix-run/fs-routes": "^2.15.0",
- "@remix-run/route-config": "^2.15.0",
"@testing-library/cypress": "^10.0.1",
"@testing-library/jest-dom": "^6.1.4",
"@types/compression": "^1.7.4",
@@ -111,16 +114,16 @@
"prettier-plugin-tailwindcss": "^0.5.7",
"prisma": "^5.7.0",
"start-server-and-test": "^2.0.1",
- "tailwindcss": "^3.4.3",
+ "tailwindcss": "^3.3.3",
"vite": "^4.5.5",
- "vite-tsconfig-paths": "^4.3.2",
+ "vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.34.6"
},
"engines": {
"node": ">=20.0.0"
},
"prisma": {
- "seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} -r tsconfig-paths/register prisma/seed.ts"
+ "seed": "ts-node --transpile-only -r tsconfig-paths/register prisma/seed.ts"
},
"lint-staged": {
"**/*.{ts,js,tsx,jsx}": [
diff --git a/remix.config.js b/remix.config.js
new file mode 100644
index 00000000..29582b29
--- /dev/null
+++ b/remix.config.js
@@ -0,0 +1,6 @@
+/** @type {import('@remix-run/dev').AppConfig} */
+module.exports = {
+ cacheDirectory: "./node_modules/.cache/remix",
+ ignoredRouteFiles: ["**/.*", "**/*.test.{ts,tsx}"],
+ serverModuleFormat: "cjs",
+};
diff --git a/remix.env.d.ts b/remix.env.d.ts
new file mode 100644
index 00000000..dcf8c45e
--- /dev/null
+++ b/remix.env.d.ts
@@ -0,0 +1,2 @@
+///
+///
diff --git a/tailwind.config.ts b/tailwind.config.ts
index 42f726ed..ee336cab 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -4,7 +4,6 @@ import defaultTheme from "tailwindcss/defaultTheme";
export default {
content: ["./app/**/*.{js,jsx,ts,tsx}"],
-
theme: {
extend: {
fontFamily: {
@@ -20,15 +19,5 @@ export default {
},
},
},
-
- safelist: [
- { pattern: /bg-(kyoiku|joyo|jinmeiyo|hyogai|extra).*/ },
-
- "[transform-origin:bottom]",
- "[transform-origin:top]",
- "opacity-0",
- "transition-opacity",
- "duration-300",
- ],
plugins: [],
} satisfies Config;
diff --git a/tsconfig.json b/tsconfig.json
index 2486953c..3a911ae9 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -3,12 +3,12 @@
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2021"],
- "types": ["@remix-run/node", "vite/client", "vitest/globals"],
+ "types": ["vitest/globals"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
- "module": "ESNext",
- "moduleResolution": "Bundler",
+ "module": "CommonJS",
+ "moduleResolution": "node",
"resolveJsonModule": true,
"target": "ES2021",
"strict": true,
diff --git a/vite.config.js b/vite.config.js
index 5fbabed3..70b74e1a 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -3,9 +3,6 @@ import { defineConfig } from "vite";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
- server: {
- port: 3000,
- },
plugins: [
remix({
cacheDirectory: "./node_modules/.cache/remix",