|
1 | 1 | # Manifest
|
2 | 2 |
|
3 |
| -In WXT, there is no `manifest.json` file in your source code. Instead, WXT generates it during the build process based off files in your project. |
| 3 | +In WXT, there is no `manifest.json` file in your source code. Instead, WXT generates the manifest from using multiple sources: |
4 | 4 |
|
5 |
| -## Manifest Config |
| 5 | +- Global options [defined in your `wxt.config.ts` file](#global-options) |
| 6 | +- Entrypoint-specific options [defined in your entrypoints](/guide/essentials/entrypoints#defining-manifest-options) |
| 7 | +- [WXT Modules](/guide/essentials/wxt-modules) added to your project can modify your manifest |
| 8 | +- [Hooks](/guide/essentials/config/hooks) defined in your project can modify your manifest |
6 | 9 |
|
7 |
| -To manually add a property to the `manifest.json` output during builds, use the `manifest` config inside `wxt.config.ts`: |
| 10 | +Your extension's `manifest.json` will be output to `.output/{target}/manifest.json` when running `wxt build`. |
| 11 | + |
| 12 | +## Global Options |
| 13 | + |
| 14 | +To add a property to your manifest, use the `manifest` config inside your `wxt.config.ts`: |
8 | 15 |
|
9 | 16 | ```ts
|
10 | 17 | export default defineConfig({
|
@@ -130,7 +137,7 @@ public/
|
130 | 137 | └─ icon-128.png
|
131 | 138 | ```
|
132 | 139 |
|
133 |
| -Specifically, if an icon must match one of these regex to be discovered: |
| 140 | +Specifically, an icon must match one of these regex to be discovered: |
134 | 141 |
|
135 | 142 | <<< @/../packages/wxt/src/core/utils/manifest.ts#snippet
|
136 | 143 |
|
@@ -216,22 +223,7 @@ By default, whenever an `action` is generated, WXT falls back to `browser_action
|
216 | 223 |
|
217 | 224 | ### Action With Popup
|
218 | 225 |
|
219 |
| -To generate a manifest where a UI appears after clicking the icon, just create a [Popup entrypoint](/guide/essentials/entrypoints#popup). |
220 |
| - |
221 |
| -```ts |
222 |
| -export default defineConfig({ |
223 |
| - hooks: { |
224 |
| - build: { |
225 |
| - manifestGenerated(manifest) { |
226 |
| - // Update the manifest variable by reference |
227 |
| - manifest.name = 'Overriden name'; |
228 |
| - }, |
229 |
| - }, |
230 |
| - }, |
231 |
| -}); |
232 |
| -``` |
233 |
| - |
234 |
| -If you want to use a `page_action` for MV2, add the following meta tag to the HTML document's head: |
| 226 | +To generate a manifest where a UI appears after clicking the icon, just create a [Popup entrypoint](/guide/essentials/entrypoints#popup). If you want to use a `page_action` for MV2, add the following meta tag to the HTML document's head: |
235 | 227 |
|
236 | 228 | ```html
|
237 | 229 | <meta name="manifest.type" content="page_action" />
|
|
0 commit comments