Skip to content

Move remark/rehype build pipeline from dependencies to devDependencies #175

@ooloth

Description

@ooloth

Current state

Four packages used exclusively at build time — remark-parse, remark-rehype, rehype-pretty-code, and rehype-stringify — are listed under dependencies in package.json. These packages run during the Next.js static export build to transform Notion code blocks into highlighted HTML; they are never executed in the browser or at request time. Declaring them as runtime dependencies misrepresents their role and pulls them into any production-targeting install that would otherwise skip dev/build tooling.

Ideal state

  • remark-parse, remark-rehype, rehype-pretty-code, and rehype-stringify are listed under devDependencies in package.json
  • npm run build continues to succeed
  • npm install --production does not install these four packages

Out of scope

Changing the packages that perform code highlighting (shiki is already a devDependency); any changes to runtime behavior.

Starting points

  • package.jsondependencies section currently lists all four packages
  • ui/elements/code.tsx — the only file that imports these packages, confirming build-only usage

QA plan

  1. Move all four packages from dependencies to devDependencies in package.json
  2. Delete node_modules and run npm install — expect all four packages present in node_modules
  3. Run npm run build — expect a successful static export with no import errors related to remark or rehype
  4. Run npm install --production — expect none of the four packages to appear in node_modules

Done when

All four remark/rehype pipeline packages are declared under devDependencies and npm run build produces a successful static export.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions