chore: vercel cache all vendor js

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-10-05 15:10:00 +08:00
parent 657dcf0ff2
commit ab42232d8e
2 changed files with 17 additions and 1 deletions
+11
View File
@@ -12,5 +12,16 @@
"source": "/(.*)",
"destination": "/index.html"
}
],
"headers": [
{
"source": "/vendor/*.js",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=31536000, immutable"
}
]
}
]
}
+6 -1
View File
@@ -76,8 +76,11 @@ export default ({ mode }) => {
mkcert(),
devPrint(),
createDependencyChunksPlugin([
["react", "react-dom"],
// React framework
["react", "react-dom", "react-router-dom", "react-error-boundary"],
// Data Statement
["zustand", "jotai", "use-context-selector", "immer", "dexie"],
// Remark
[
"remark-directive",
"remark-gfm",
@@ -87,6 +90,7 @@ export default ({ mode }) => {
"@microflash/remark-callout-directives",
"remark-gh-alerts",
],
// Rehype
[
"rehype-parse",
"rehype-sanitize",
@@ -101,6 +105,7 @@ export default ({ mode }) => {
["clsx", "tailwind-merge", "class-variance-authority"],
["@radix-ui/react-dialog", "re-resizable"],
["i18next", "i18next-browser-languagedetector", "react-i18next"],
// Data query
[
"@tanstack/react-query",
"@tanstack/react-query-persist-client",