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.json — dependencies section currently lists all four packages
ui/elements/code.tsx — the only file that imports these packages, confirming build-only usage
QA plan
- Move all four packages from
dependencies to devDependencies in package.json
- Delete
node_modules and run npm install — expect all four packages present in node_modules
- Run
npm run build — expect a successful static export with no import errors related to remark or rehype
- 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.
Current state
Four packages used exclusively at build time —
remark-parse,remark-rehype,rehype-pretty-code, andrehype-stringify— are listed underdependenciesinpackage.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, andrehype-stringifyare listed underdevDependenciesinpackage.jsonnpm run buildcontinues to succeednpm install --productiondoes not install these four packagesOut of scope
Changing the packages that perform code highlighting (
shikiis already a devDependency); any changes to runtime behavior.Starting points
package.json—dependenciessection currently lists all four packagesui/elements/code.tsx— the only file that imports these packages, confirming build-only usageQA plan
dependenciestodevDependenciesinpackage.jsonnode_modulesand runnpm install— expect all four packages present innode_modulesnpm run build— expect a successful static export with no import errors related to remark or rehypenpm install --production— expect none of the four packages to appear innode_modulesDone when
All four remark/rehype pipeline packages are declared under
devDependenciesandnpm run buildproduces a successful static export.