Skip to content

docs: How WXT works page - #2646

Merged
nishu-murmu merged 15 commits into
mainfrom
how-wxt-works-2
Oct 10, 2026
Merged

nishu-murmu merged 15 commits into
mainfrom
how-wxt-works-2

Conversation

@aklinker1

@aklinker1 aklinker1 commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Overview

Describes at a high level the general processes and patterns WXT uses.

Manual Testing

See netlify preview: https://deploy-preview-2646--creative-fairy-df92c4.netlify.app/guide/resources/how-wxt-works.html

Related Issue

This PR closes #2645

@netlify

netlify Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 0e4473c
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6aca087b56e40b0008bdd5be
😎 Deploy Preview https://deploy-preview-2646--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 62cd4600-6062-439d-966c-21b683296e32

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Oct 3, 2026
@aklinker1
aklinker1 marked this pull request as ready for review October 3, 2026 17:12
@aklinker1 aklinker1 added the docs Improvements or additions to documentation label Oct 3, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2646

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2646

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2646

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2646

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2646

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2646

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2646

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2646

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2646

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2646

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2646

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2646

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2646

wxt

npm i https://pkg.pr.new/wxt@2646

commit: 0e4473c

@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.73%. Comparing base (29baa0e) to head (0e4473c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2646      +/-   ##
==========================================
- Coverage   79.85%   79.73%   -0.13%     
==========================================
  Files         138      138              
  Lines        4111     4111              
  Branches      943      943              
==========================================
- Hits         3283     3278       -5     
- Misses        731      736       +5     
  Partials       97       97              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@aklinker1 Great work, but HUH

That's a looot of information, it's sooo complicated, as i've thought when i was going through code.

I need to spend much more time on it and i'll be back with any feedback.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@aklinker1 Let's write a little about "How Vitepress docs works"

@nishu-murmu

Copy link
Copy Markdown
Collaborator

@aklinker1 Let's write a little about "How Vitepress docs works"

We should have separate section for this as well. or else it will be too cluttered.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@aklinker1 Let's write a little about "How Vitepress docs works"

We should have separate section for this as well. or else it will be too cluttered.

Yeah, for sure

@PatrykKuniczak

PatrykKuniczak commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

@aklinker1 Let's write something about "How build func was run via CLI".
And "How hooks from plugins e.g 'devHtmlPrerender' -> 'wxt:dev-html-prerender' " works, where have you run it.
https://deploy-preview-2646--creative-fairy-df92c4.netlify.app/guide/resources/how-wxt-works.html#pre-render-files
https://deploy-preview-2646--creative-fairy-df92c4.netlify.app/guide/resources/how-wxt-works.html#virtual-modules

And maybe write a little more in this section:
https://deploy-preview-2646--creative-fairy-df92c4.netlify.app/guide/resources/how-wxt-works.html#wxt-directory

Describe it in details, maybe not much, but a little more info 😸

Let's place more links to code and i think, it'll be completely enough.

@PatrykKuniczak

PatrykKuniczak commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

@aklinker1 Let's write a little about "How Vitepress docs works"

We should have separate section for this as well. or else it will be too cluttered.

Let's make it in another PR, also docs for the rest of the packages and how automatic releasing new version works, it will be useful.
I hope @aklinker1 will do it(I hope soon) in the future 😄

@aklinker1

aklinker1 commented Oct 4, 2026 •

Copy link
Copy Markdown
Member Author

Let's write a little about "How Vitepress docs works"

It should probably go in CONTRIBUTING.md... but what needs more info? What isn't covered by vitepress's docs?

@aklinker1

Copy link
Copy Markdown
Member Author

Let's write something about "How build func was run via CLI".

I also don't think that belongs on this page. It's also very easy to trace from the package.json (package.json#bin.wxt → bin/wxt.mjs → dist/cli/index.mjs → src/cli/index.ts → src/cli/commands.ts → build.ts). General "how NPM package CLIs work" doesn't really have anything to do with WXT.

I can add a section on how the CLI calls the public WXT APIs though. There are some nuonces there.

@aklinker1

Copy link
Copy Markdown
Member Author

And maybe write a little more in this section:
https://deploy-preview-2646--creative-fairy-df92c4.netlify.app/guide/resources/how-wxt-works.html#wxt-directory

Describe it in details, maybe not much, but a little more info 😸

Sure, I can add some details about how types are hooked up. I'm trying to avoid mentioning specific files that aren't generated by the core package, but I can talk about the .wxt/wxt.d.ts file and how TS project files are included.

@suveshmoza

Copy link
Copy Markdown
Collaborator

I think some flow diagrams or visualizations would help a lot here. It’d make the overall flow much easier to understand.

@aklinker1

Copy link
Copy Markdown
Member Author

Vitepress doesn't support mermaid diagrams out-of-the-box, but I've added them

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

Let's write something about "How build func was run via CLI".

I also don't think that belongs on this page. It's also very easy to trace from the package.json (package.json#bin.wxt → bin/wxt.mjs → dist/cli/index.mjs → src/cli/index.ts → src/cli/commands.ts → build.ts). General "how NPM package CLIs work" doesn't really have anything to do with WXT.

I can add a section on how the CLI calls the public WXT APIs though. There are some nuonces there.

Yeah, that one is easy to trace as you've mentioned, but i mean place one liner about that, but without it, it also be good.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

Let's write a little about "How Vitepress docs works"

It should probably go in CONTRIBUTING.md... but what needs more info? What isn't covered by vitepress's docs?

To be honest, one liner with simply explanation, with docs link will be enough.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@aklinker1 OO I see changes now, looks good, i'll take a look on that with fresh mind, tomorrow.

@aklinker1

Copy link
Copy Markdown
Member Author

Vitepress is already documented here: https://github.com/wxt-dev/wxt/blob/main/CONTRIBUTING.md#updating-docs

Not gonna go into it on a page talking about WXT's internals.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

Vitepress is already documented here: https://github.com/wxt-dev/wxt/blob/main/CONTRIBUTING.md#updating-docs

Not gonna go into it on a page talking about WXT's internals.

Yeah, totally agree, i mean put a link in CONTRIBUTING.md

I can do it later ;)

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@aklinker1 Very nice, one more think.

https://deploy-preview-2646--creative-fairy-df92c4.netlify.app/guide/resources/how-wxt-works.html#the-wxt-object
As mentioned, it's initialized when any of the higher-level public APIs are called - Can you provide here one usage example, maybe diagram or sth :)

@aklinker1

Copy link
Copy Markdown
Member Author

Can you provide here one usage example, maybe diagram or sth :)

Is the example in https://deploy-preview-2646--creative-fairy-df92c4.netlify.app/guide/resources/how-wxt-works.html#public-apis-vs-cli not good enough? Should I move it down into the "wxt object" section?

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

Can you provide here one usage example, maybe diagram or sth :)

Is the example in https://deploy-preview-2646--creative-fairy-df92c4.netlify.app/guide/resources/how-wxt-works.html#public-apis-vs-cli not good enough? Should I move it down into the "wxt object" section?

It's enough to link it(this section) in "wxt object" section.

@PatrykKuniczak PatrykKuniczak 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.

LGTM, thanks a looooot.
What's a part of engineered machine.

@aklinker1

@PatrykKuniczak

PatrykKuniczak commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

@nishu-murmu Good to you also?
If yes, let's merge it 😄

@nishu-murmu
nishu-murmu enabled auto-merge (squash) October 10, 2026 09:42
@nishu-murmu

Copy link
Copy Markdown
Collaborator

Yup, it all looks good to me!

@nishu-murmu
nishu-murmu merged commit 1622f90 into main Oct 10, 2026
19 checks passed
@nishu-murmu
nishu-murmu deleted the how-wxt-works-2 branch October 10, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider to describe "How WXT works"

4 participants