Concrete
Rulesbundles

concrete/bundles/renderer-size

A section's renderer bundle is over 300 KB gzip.

A section's renderer bundle is over 300 KB gzip.

Graded by the bundles stage of concrete check, in the build venue. A violation reports this id and the file it failed at — see every rule and concrete check.

Reason

A renderer bundle is loaded and kept by every platform process that renders the section — the publisher, the editor's canvas, the capture worker — so its weight is paid on every page, every edit and every re-render, not once per visitor. Publishing is what makes that cost permanent: a published bundle is immutable, and the 300 KB gzip ceiling is what keeps a template from carrying a dataset into every one of those processes.

Fix

Import only what the render uses. A renderer this heavy is usually carrying a data file, a whole library barrel or a build tool — data that varies per listing belongs in facts or slots, and a table the template really does own can be fetched by an island instead of inlined.

Before and after

import { Section, section, Slot, text } from "@homepages/concrete";

// 4,000 rows of market data, inlined into the renderer every process loads.
const COMPS = [
  { zip: "11201", median: 1250000 },
  { zip: "11215", median: 1610000 },
  // …
];

export const Market = section(
  { key: "market", label: "Market", slots: { zip: text.short({ label: "ZIP" }) } },
  ({ slot }) => (
    <Section>
      <Slot.Text slot={slot.zip} as="p" />
      <p>{COMPS.find((row) => row.zip === String(slot.zip.value))?.median ?? ""}</p>
    </Section>
  ),
);
import { number, Section, section, Slot, text } from "@homepages/concrete";

export const Market = section(
  {
    key: "market",
    label: "Market",
    slots: { zip: text.short({ label: "ZIP" }), median: number({ label: "Median price" }) },
  },
  ({ slot }) => (
    <Section>
      <Slot.Text slot={slot.zip} as="p" />
      <Slot.Number slot={slot.median} as="p" format={(value) => `$${value.toLocaleString("en-US")}`} />
    </Section>
  ),
);

On this page