From 8235de04d2014691ce99d2292dcba76e6c13e6e9 Mon Sep 17 00:00:00 2001 From: Aaron Date: Thu, 15 Aug 2024 16:50:42 -0500 Subject: [PATCH] chore: Add profiling docs to CONTRIBUTING.md --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 43231735..58eb4541 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -57,6 +57,21 @@ pnpm test pnpm docs:dev ``` +## Profiling + +```sh +# Build the latest version +pnpm --filter wxt build + +# CD to the demo directory +cd packages/wxt-demo + +# 1. Generate a flamechart with 0x +pnpm dlx 0x node_modules/wxt/bin/wxt.mjs build +# 2. Inspect the process with chrome @ chrome://inspect +pnpm node --inspect node_modules/wxt/bin/wxt.mjs build +``` + ## Updating Docs Documentation is written with VitePress, and is located in the `docs/` directory.