Skip to content

Commit 57608db

Browse files
committed
Add Getting Started and CCIP-BnM UI Faucet for Aptos
1 parent dfbd10f commit 57608db

File tree

9 files changed

+1481
-1009
lines changed

9 files changed

+1481
-1009
lines changed

astro.config.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,30 @@ export default defineConfig({
109109
adapter: vercel(),
110110
vite: {
111111
plugins: [yaml()],
112+
resolve: {
113+
// Ensure only ONE copy of these ends up in any chunk
114+
dedupe: ["react", "react-dom", "@aptos-labs/ts-sdk", "@aptos-labs/wallet-adapter-react"],
115+
},
112116
build: {
113117
target: "esnext", // Use latest ES features, no transpilation for modern browsers
114118
// Optimize CSS delivery
115119
cssMinify: true,
116120
// Increase the threshold for inlining assets to reduce render-blocking CSS
117121
assetsInlineLimit: 20000, // Inline CSS files up to 20KB to eliminate render-blocking
118-
// Removed manual chunking to prevent serverless function bloat
119-
// rollupOptions: {
120-
// output: {
121-
// manualChunks: ...
122-
// }
123-
// },
122+
// ⬇️ Split vendor families so duplicate minified helpers don't share a chunk
123+
rollupOptions: {
124+
output: {
125+
manualChunks(id) {
126+
if (!id.includes("node_modules")) return
127+
if (id.includes("@aptos-labs")) return "aptos"
128+
if (id.includes("@aptos-connect") || id.includes("@identity-connect")) return "aptos-ic"
129+
if (id.includes("@solana")) return "solana"
130+
if (id.includes("@keystonehq") || id.includes("react-qr-reader") || id.includes("qrcode.react")) {
131+
return "keystone-legacy"
132+
}
133+
},
134+
},
135+
},
124136
},
125137
esbuild: {
126138
target: "esnext", // Match build target for consistency

0 commit comments

Comments
 (0)