perf(__docs__,ui-babel-preset): speed up and quiet the docs dev server#2611
Open
balzss wants to merge 1 commit into
Open
perf(__docs__,ui-babel-preset): speed up and quiet the docs dev server#2611balzss wants to merge 1 commit into
balzss wants to merge 1 commit into
Conversation
|
Visual regression report✅ No changes.
Baselines come from the |
Parse the ~1700 doc source files across a pool of worker threads instead of serially. react-docgen/babel parsing is CPU-bound and single-threaded, so fanning the files out across cores is the dominant `pnpm dev` startup win. Workers return results keyed by original index so the output matches the serial build regardless of completion order. Extract the pure parsing/writing logic into parseSingleFile.mts (shared by the parallel build and the markdown watcher) and add parse-worker.mts as the worker entry point. Quiet startup output by default: replace per-file and per-step logs with a single progress bar and a "Dev server ready" summary, silence webpack's per-asset stats and dev-server banner, and add a DevServerStatus plugin that owns the compile output. Opt back into full logging with `DOCS_VERBOSE=1` or the new `pnpm run dev:verbose` script. Add an `inlineHelpers` option to ui-babel-preset that emits Babel helpers inline instead of importing them from `@babel/runtime`, and enable it in the docs babel config. The dev build compiles `@instructure/*` from raw src to CommonJS while webpack resolves `@babel/runtime` via the `import` condition (ESM helpers), a mismatch that crashed with "_interopRequireDefault is not a function". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
4c74423 to
a3aea0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parseSingleFile.mts(shared with the markdown watcher) and addparse-worker.mts.pnpm devoutput by default — progress bar + "Dev server ready" summary, silenced webpack stats/banner via aDevServerStatusplugin; opt back in withDOCS_VERBOSE=1orpnpm run dev:verbose.inlineHelpersoption to ui-babel-preset (emits Babel helpers inline) and enable it in the docs config to fix the_interopRequireDefault is not a functioncrash from the@babel/runtimeESM/CJS mismatch.Test Plan
pnpm run devand confirm the docs site builds at http://localhost:9090 with quiet output and a working progress bar.pnpm run dev:verbose(andDOCS_VERBOSE=1) and confirm full per-file/step logging returns.🤖 Generated with Claude Code