Skip to content

Instantly share code, notes, and snippets.

View ADTC's full-sized avatar

Arundas TC ADTC

View GitHub Profile
@ADTC
ADTC / README.md
Last active May 29, 2026 05:46
Add an Astro integration to inject modulepreload hints

Add an Astro integration to inject modulepreload hints

Astro doesn't emit <link rel="modulepreload"> tags, so browsers discover JS dependencies one hop at a time. A Vite plugin now walks the client chunk graph at build time and injects a dependency manifest; an Astro middleware reads it and injects modulepreload hints into every HTML response, letting the browser fetch all modules in parallel from the first HTML parse.

For context, see withastro/roadmap#561

@ADTC
ADTC / .github__workflows__deploy.yml
Last active July 8, 2026 13:16
Example GitHub Actions workflow for deploying to Vercel without connecting GitHub account
name: Deploy to Vercel
on:
push:
branches:
- main
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}