Skip to content

ci: build the offline export with webpack - #421

Open
nickvigilante wants to merge 2 commits into
mainfrom
vigilante/offline-webpack-ci
Open

nickvigilante wants to merge 2 commits into
mainfrom
vigilante/offline-webpack-ci

Conversation

@nickvigilante

Copy link
Copy Markdown
Collaborator

Merge order

Independent; can merge any time.

Summary

Adds a CI job, offline export on webpack, that builds apps/offlinedocs with next build --webpack on the fixture corpus and runs playground:check on the output. The offline kit supports webpack, but nothing built with it, so a node: import reaching the bundle from the @coder/docs-config root was only caught by a manual check. A webpack-only breakage now fails CI.

Design

The diff is one new job plus its entry in the needs: list of build & check; nothing else in .github/workflows/ changed, and there are no secret references or new triggers. The job uses the repo's setup composite action and the same pinned checkout SHA as the other jobs, builds the packages, runs the app's sync (which also runs fumadocs-mdx via postsync; next build alone does not sync, since prebuild only fires for pnpm build), then next build --webpack and pnpm --filter @coder/offlinedocs playground:check. It doesn't run the relocate-twins and semantic-index steps, since those don't depend on the bundler. The job runs in parallel with every other job, because nothing needs it except the aggregator. Locally the sync plus webpack build took about 30 seconds on a warm machine, so expect roughly 2 to 3 minutes of CI wall time including setup, with no added time on the critical path unless it becomes the slowest job.

QA

Nothing to see on the site; this is a CI-only change. The job shows it working on this PR's own Checks tab, as offline export on webpack, and it should be listed in the build & check needs output.

Pages to compare

Not applicable for a CI-only change.

Testing

On the fixture corpus with Node 24: pnpm --filter @coder/offlinedocs sync, then pnpm exec next build --webpack in apps/offlinedocs (about 30s, passes), then playground:check (passes, no playground code). To prove it catches the original failure, I temporarily added import "node:fs" to the @coder/docs-config root and imported the root from a client component in the offline app; the webpack build failed with Failed to compile on node:fs. I reverted that change and it is not committed. apps/docs/scripts/workflow-secrets.test.mjs passes (11 of 11) and Oxfmt reports the workflow formatted. actionlint and shellcheck are not installed here, so pnpm lint:actions was not run locally; the actionlint job in CI covers it.

Upstream

No. This is this repository's own CI and has nothing to do with fumadocs-ui or fumadocs-core.

Linear: https://linear.app/codercom/issue/DOCS-1912/test-the-webpack-offline-build-in-ci


🤖 Built with AI assistance.

The offline kit supports webpack, but no job built with it, so a node: import reaching the bundle from the docs-config root was only caught by hand. A new job syncs the fixture corpus, runs next build --webpack for apps/offlinedocs, and runs playground:check on the output. It is in the needs list of build & check.

Assisted-by: AI
@nickvigilante
nickvigilante marked this pull request as ready for review December 4, 2026 19:11
@nickvigilante
nickvigilante requested a review from a team as a code owner December 4, 2026 19:11

@Jesswinters Jesswinters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. The job is small, it follows the existing patterns in ci.yml, and gating build & check on it is the right call. CI is green.

Optional nits (P2, not blocking):

  • Say why the job exists. Add a one-line comment above offline-webpack, for example: "Turbopack lets node: imports leak into the client bundle; only webpack fails on them." Without it, someone may later remove the job as a duplicate of the regular offline build.
  • Scope of checks. The job runs playground:check but not the csp/annotations/analytics checks or relocate-twins on the webpack output. That's fine if the goal is only "webpack builds". A short note in the comment would make the scope clear.
  • persist-credentials: false on checkout. This is low priority because the other jobs in ci.yml don't set it either. It could be a small follow-up that covers all jobs.

Coder Agents generated this review for @Jesswinters.

Without a note, the job reads as a duplicate of the regular offline
build and could be removed.

Assisted-by: AI

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants