Skip to content

Reintroduce bundle-size tracking with size-limit #10

Description

@dogmar

The size-limit fixtures under package/size-limit/ were removed in #9 because nothing invoked them: there was no size-limit config key, no script or CI step ran the tool, and one fixture imported ../site/, a path that predates the monorepo. The four devDependencies (size-limit, @size-limit/esbuild, @size-limit/esbuild-why, @size-limit/file) were removed with them.

To bring bundle-size tracking back properly:

  • Recover the entry fixtures from git history (git show <pre-#9>:package/size-limit/) and fix the stale ../site/ import (now ../../website/src/lib/drag-components)
  • Add a size-limit config (package.json key or .size-limit.json) with budgets per entry (full bundle, unstyled, unstyled-drag, unstyled-mini)
  • Wire it into CI after the library build so regressions fail the PR (fixtures import ../dist/index.js, so a vp run @klinking/colander#build must precede it)
  • Exclude the fixtures from vp lint type checking or give them a tsconfig that resolves ../dist (this was the reason they broke type checking in docs: precompile Markdoc into React route components at build time #9)

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions