Skip to content

Commit

Permalink
docs: General fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Dec 27, 2023
1 parent 6421ab3 commit 2ad099b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 14 deletions.
22 changes: 10 additions & 12 deletions docs/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ export default defineConfig({
});
```

## Vite Config

[Vite](https://vitejs.dev/) is the bundler used to build each entrypoint of your extension. Vite can be configured via the `vite` option.

See [Vite's documentation](https://vitejs.dev/config/) for configuring the bundler.

## Frontend Frameworks

Adding a framework like Vue, React, or Svelte is easy!
Expand All @@ -70,9 +64,9 @@ import { defineConfig } from 'wxt';
import vue from '@vitejs/plugin-vue';

export default defineConfig({
vite: {
vite: () => ({
plugins: [vue()],
},
}),
});
```

Expand All @@ -81,9 +75,9 @@ import { defineConfig } from 'wxt';
import react from '@vitejs/plugin-react';

export default defineConfig({
vite: {
vite: () => ({
plugins: [react()],
},
}),
});
```

Expand All @@ -92,10 +86,14 @@ import { defineConfig } from 'wxt';
import { svelte } from '@sveltejs/vite-plugin-svelte';

export default defineConfig({
vite: {
vite: () => ({
plugins: [svelte()],
},
}),
});
```

:::

:::info
Internally, WXT runs `vite build` multiple times during a single build. It can't share the same instance of some plugins between each build, so a function is used to return completely new instances of each plugin for each build.
:::
8 changes: 7 additions & 1 deletion docs/guide/manifest.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Manifest.json

The manifest.json is generated at build-time based on files in your `entrypoints` directory and your `wxt.config.ts`.
The manifest.json is generated at build-time based on files in the `entrypoints/` directory and `wxt.config.ts`.

## Configuration

While entrypoints are generated and added to the manifest at build-time, you can customize or add to your `manifest.json` in the config file.

```ts
// wxt.config.tsentrypoint of your extension
import { defineConfig } from 'wxt';

export default defineConfig({
Expand Down Expand Up @@ -118,3 +119,8 @@ export default defineConfig({
},
});
```

See the official localization examples for more details:

- [I18n](https://github.com/wxt-dev/wxt-examples/tree/main/examples/vanilla-i18n#readme)
- [Vue I18n](https://github.com/wxt-dev/wxt-examples/tree/main/examples/vue-i18n#readme)
2 changes: 1 addition & 1 deletion docs/guide/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ WXT offers several utilities that simplify the publishing process.

## First Time Publishing

If you're publishing an extension to a store for the first time, it's recommended that you manually navigate the process. Each store has unique steps and requirements that you need to familiarize yourself with.
If you're publishing an extension to a store for the first time, you must manually navigate the process. Each store has unique steps and requirements that you need to familiarize yourself with.

Each store requires that a ZIP file be uploaded. You can generate these using the `wxt zip` command:

Expand Down

0 comments on commit 2ad099b

Please sign in to comment.