豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

chore(build): add devtools-formatter-worker.ts bundle#792

Merged
OrKoN merged 2 commits intomainfrom
formatter-entrypoint
Jan 19, 2026
Merged

chore(build): add devtools-formatter-worker.ts bundle#792
OrKoN merged 2 commits intomainfrom
formatter-entrypoint

Conversation

@szuend
Copy link
Copy Markdown
Contributor

@szuend szuend commented Jan 19, 2026

The devtools-formatter-worker is a separate entrypoint from the MCP entrypoint. It is identical to the upstream front_end/entrypoints/formatter_worker/formatter_worker-entrypoint.js and a required part to make source mapping, formatting and other AST-based DevTools features work.

The implementation consists of 3 parts:

  1. A trivial devtools-formatter-worker.ts file that imports the DevTools entrypoint.
  2. A new bundle output, bundling everything that needs to run in the worker.
  3. A call that initializes the FormatterWorkerPool with the custom entrypoint. Otherwise we'd use the unbundled entrypoint from chrome-devtools-frontend not available to us at runtime.

Note that we could improve code splitting in the future as some things like core/common are now bundled twice.

@szuend szuend requested a review from OrKoN January 19, 2026 06:41
Comment thread src/third_party/devtools-formatter-worker.ts Outdated
szuend and others added 2 commits January 19, 2026 10:14
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
@szuend szuend force-pushed the formatter-entrypoint branch from 40ee933 to 41ecd35 Compare January 19, 2026 09:14
@OrKoN OrKoN enabled auto-merge January 19, 2026 09:16
@OrKoN OrKoN added this pull request to the merge queue Jan 19, 2026
Merged via the queue into main with commit 7ba63a8 Jan 19, 2026
20 checks passed
@OrKoN OrKoN deleted the formatter-entrypoint branch January 19, 2026 09:21
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