Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 72b8a29

Browse files
authoredJan 6, 2025··
docs: Improve entrypoint docs
1 parent af0a32d commit 72b8a29

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed
 

‎docs/guide/essentials/entrypoints.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For web extensions, there are two types of entrypoints:
2828
- **Listed**: Referenced in the `manifest.json`
2929
- **Unlisted**: Not referenced in the `manifest.json`
3030

31-
Throughout the rest of WXT's documentation, listed files are referred to by name. For example:
31+
Throughout the rest of WXT's documentation, listed entrypoints are referred to by name. For example:
3232

3333
- Popup
3434
- Options
@@ -42,7 +42,7 @@ Some examples of "unlisted" entrypoints:
4242
- JS files injected by content scripts into the page's main world
4343

4444
:::tip
45-
Regardless of whether a entrypoint is listed or unlisted, it will still be bundled into your extension and be available at runtime.
45+
Regardless of whether an entrypoint is listed or unlisted, it will still be bundled into your extension and be available at runtime.
4646
:::
4747

4848
## Adding Entrypoints
@@ -72,7 +72,7 @@ Refer to the [Entrypoint Types](#entrypoint-types) section for the full list of
7272

7373
## Defining Manifest Options
7474

75-
Most listed entrypoints have options that need to be added to the `manifest.json`. With WXT however, instead of defining the options in a separate file, _you define these options inside the entrypoint file itself_.
75+
Most listed entrypoints have options that need to be added to the `manifest.json`. However with WXT, instead of defining the options in a separate file, _you define these options inside the entrypoint file itself_.
7676

7777
For example, here's how to define `matches` for content scripts:
7878

@@ -86,6 +86,17 @@ export default defineContentScript({
8686
});
8787
```
8888

89+
For HTML entrypoints, options are configured as `<meta>` tags. For example, to use a `page_action` for your MV2 popup:
90+
91+
```html
92+
<!doctype html>
93+
<html lang="en">
94+
<head>
95+
<meta name="manifest.type" content="page_action" />
96+
</head>
97+
</html>
98+
```
99+
89100
> Refer to the [Entrypoint Types](#entrypoint-types) sections for a list of options configurable inside each entrypoint, and how to define them.
90101
91102
When building your extension, WXT will look at the options defined in your entrypoints, and generate the manifest accordingly.

0 commit comments

Comments
 (0)
Please sign in to comment.