Skip to content

Commit 9d672cf

Browse files
committed
perf directory
1 parent 732692d commit 9d672cf

File tree

1 file changed

+9
-40
lines changed

1 file changed

+9
-40
lines changed

astro.config.ts

Lines changed: 9 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -104,53 +104,22 @@ export default defineConfig({
104104
},
105105
// output: 'static' (fully static or partial SSR with `prerender = false` ==> export const prerender = false;)
106106
output: "static",
107-
adapter: vercel(),
107+
adapter: vercel({
108+
excludeFiles: ["./public/images/**/*", "./public/search-index.json"],
109+
}),
108110
vite: {
109111
plugins: [yaml()],
110112
build: {
111113
// Optimize CSS delivery
112114
cssMinify: true,
113115
// Increase the threshold for inlining assets
114116
assetsInlineLimit: 4096, // Inline small CSS files
115-
rollupOptions: {
116-
output: {
117-
manualChunks: (id) => {
118-
// Split vendor libraries
119-
if (id.includes("node_modules")) {
120-
if (id.includes("react") || id.includes("preact")) {
121-
return "vendor-react"
122-
}
123-
if (id.includes("lodash") || id.includes("ethers")) {
124-
return "vendor-utils"
125-
}
126-
return "vendor"
127-
}
128-
129-
// Split large feeds/chains data files, avoid files with asset imports
130-
if (id.includes("src/features/data/chains.ts") && !id.includes("landing")) {
131-
return "chains-data"
132-
}
133-
134-
// Split CCIP data files by type for better caching
135-
if (id.includes("ccip") && id.includes("lanes.json")) {
136-
return "ccip-lanes" // This is the biggest file (700KB)
137-
}
138-
if (id.includes("ccip") && id.includes("tokens.json")) {
139-
return "ccip-tokens"
140-
}
141-
if (id.includes("ccip") && id.includes("chains.json")) {
142-
return "ccip-chains"
143-
}
144-
// Other CCIP data (smaller files)
145-
if (
146-
id.includes("config/data/ccip/data.ts") ||
147-
(id.includes("ccip") && id.includes("config/data") && id.includes(".json"))
148-
) {
149-
return "ccip-data"
150-
}
151-
},
152-
},
153-
},
117+
// Removed manual chunking to prevent serverless function bloat
118+
// rollupOptions: {
119+
// output: {
120+
// manualChunks: ...
121+
// }
122+
// },
154123
},
155124
css: {
156125
devSourcemap: false,

0 commit comments

Comments
 (0)