Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions packages/docs/src/components/DependencyStats.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
import { getCollection } from 'astro:content'

const frameworkEntries = await getCollection('frameworks')
const devtimeEntries = await getCollection('devtime')
const runtimeEntries = await getCollection('runtime')

const frameworkMeta = frameworkEntries.map((entry) => entry.data)
const starterStats = devtimeEntries.map((entry) => entry.data)
const ssrStats = runtimeEntries.map((entry) => entry.data)

Expand Down Expand Up @@ -37,6 +39,50 @@ function formatBytesToMB(bytes: number): string {
our methodology and testing process.
</p>

<h2>Framework Overview</h2>

<p class="methodology">
Rendering capabilities supported by each framework, their recommended
default approach, and bundler.
</p>

<div class="table-wrapper">
<table aria-label="Framework rendering capabilities">
<thead>
<tr>
<th scope="col">Framework</th>
<th scope="col">SPA</th>
<th scope="col">MPA</th>
<th scope="col">SSG</th>
<th scope="col">Recommended</th>
<th scope="col">Default Bundler</th>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if we need to separate "dev tool" and bundler

e.g. the underlying bundler of nuxt is probably going to be rolldown, with vite as the dev server/tool

but svelte might be vite and rollup (until they move to rolldown)

though im not sure what non-vite dev tools are in use

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I just shoved them into one for now, but already it's noisy. Will split them

<th scope="col">Other Bundlers</th>
</tr>
</thead>
<tbody>
{
frameworkMeta.map((framework) => (
<tr>
<td class="framework-name">{framework.name}</td>
<td>{framework.supportsSPA ? 'Y' : 'N'}</td>
<td>{framework.supportsMPA ? 'Y' : 'N'}</td>
<td>
{framework.supportsSSG === undefined
? '?'
: framework.supportsSSG
? 'Y'
: 'N'}
</td>
<td>{framework.recommended}</td>
<td>{framework.bundler}</td>
<td>{framework.otherBundlers?.join(', ') || '-'}</td>
</tr>
))
}
</tbody>
</table>
</div>

<h2>Dev Time Performance</h2>

<p class="methodology">
Expand Down
15 changes: 15 additions & 0 deletions packages/docs/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
import { defineCollection, z } from 'astro:content'

const frameworksCollection = defineCollection({
type: 'data',
schema: z.object({
name: z.string(),
package: z.string(),
supportsSPA: z.boolean(),
supportsMPA: z.boolean(),
supportsSSG: z.boolean().optional(),
recommended: z.string(),
bundler: z.string(),
otherBundlers: z.array(z.string()).optional(),
}),
})

const devtimeCollection = defineCollection({
type: 'data',
schema: z.object({
Expand Down Expand Up @@ -37,6 +51,7 @@ const runtimeCollection = defineCollection({
})

export const collections = {
frameworks: frameworksCollection,
devtime: devtimeCollection,
runtime: runtimeCollection,
}
9 changes: 9 additions & 0 deletions packages/docs/src/content/frameworks/astro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "Astro",
"package": "starter-astro",
"supportsSPA": true,
"supportsMPA": true,
"supportsSSG": true,
"recommended": "MPA/SSG - static HTML by default, zero JS",
"bundler": "Vite"
}
10 changes: 10 additions & 0 deletions packages/docs/src/content/frameworks/next-js.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Next.js",
"package": "starter-next-js",
"supportsSPA": true,
"supportsMPA": true,
"supportsSSG": true,
"recommended": "MPA",
"bundler": "Turbopack",
"otherBundlers": ["Webpack"]
}
10 changes: 10 additions & 0 deletions packages/docs/src/content/frameworks/nuxt.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Nuxt",
"package": "starter-nuxt",
"supportsSPA": true,
"supportsMPA": true,
"supportsSSG": true,
"recommended": "MPA",
"bundler": "Vite",
"otherBundlers": ["Webpack", "Rspack"]
}
10 changes: 10 additions & 0 deletions packages/docs/src/content/frameworks/react-router.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "React Router",
"package": "starter-react-router",
"supportsSPA": true,
"supportsMPA": true,
"supportsSSG": true,
"recommended": "MPA",
"bundler": "Vite",
"otherBundlers": ["Parcel"]
}
9 changes: 9 additions & 0 deletions packages/docs/src/content/frameworks/solid-start.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "SolidStart",
"package": "starter-solid-start",
"supportsSPA": true,
"supportsMPA": true,
"supportsSSG": true,
"recommended": "MPA",
"bundler": "Vinxi (Vite)"
}
10 changes: 10 additions & 0 deletions packages/docs/src/content/frameworks/sveltekit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "SvelteKit",
"package": "starter-sveltekit",
"supportsSPA": true,
"supportsMPA": true,
"supportsSSG": true,
"recommended": "MPA",
"bundler": "Vite",
"otherBundlers": ["Rolldown"]
}
8 changes: 8 additions & 0 deletions packages/docs/src/content/frameworks/tanstack-start.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "TanStack Start",
"package": "starter-tanstack-start-react",
"supportsSPA": true,
"supportsMPA": true,
"recommended": "MPA",
"bundler": "Vite"
}