docs: Add migration docs
This commit is contained in:
@@ -3,18 +3,26 @@
|
||||
<span>WXT</span>
|
||||
</h1>
|
||||
|
||||
<p class="float: left"></p>
|
||||
|
||||
<p align="center">Next-gen framework for developing web extensions.<br/>◇<br/><q><i>It's like Nuxt, but for Chrome Extensions</i></q></p>
|
||||
|
||||

|
||||
<p align="center">
|
||||
<span>Next-gen framework for developing web extensions.</span>
|
||||
<br/>
|
||||
<span>⚡</span>
|
||||
<br/>
|
||||
<q><i>It's like Nuxt, but for Chrome Extensions</i></q>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/wxt-dev/wxt/actions/workflows/validate.yml" target="blank"><img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/wxt-dev/wxt/validate.yml?label=Checks"></a>
|
||||
<a href="https://wxt.dev" target="blank"><img alt="Documentation" src="https://img.shields.io/badge/Docs-wxt.dev-blue"></a>
|
||||
<a href="https://github.com/wxt-dev/wxt-examples" target="blank"><img alt="Examples" src="https://img.shields.io/badge/Examples-GitHub-blue"></a>
|
||||
<a href="https://wxt.dev" target="_blank">Get Started</a>
|
||||
•
|
||||
<a href="https://wxt.dev/get-started/installation.html" target="_blank">Installation</a>
|
||||
•
|
||||
<a href="https://wxt.dev/guide/background.html" target="_blank">Entrypoints</a>
|
||||
•
|
||||
<a href="https://wxt.dev/config.html" target="_blank">Configuration</a>
|
||||
</p>
|
||||
|
||||

|
||||
|
||||
## Quick Start
|
||||
|
||||
Bootstrap a new project:
|
||||
@@ -37,7 +45,7 @@ Or see the [installation guide](https://wxt.dev/get-started/installation.html) t
|
||||
- 🎨 Frontend framework agnostic: works with Vue, React, Svelte, etc
|
||||
- 🖍️ Quickly bootstrap a new project
|
||||
|
||||
### Todo
|
||||
### Coming Soon
|
||||
|
||||
- 📏 Bundle analysis
|
||||
- 🤖 Automated publishing
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Installation
|
||||
|
||||
Bootstrap a new project or start from scratch.
|
||||
Bootstrap a new project, start from scratch, or migrate an existing project.
|
||||
|
||||
:::warning 🚧 WSL Support
|
||||
**_WXT does not support [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/) yet_**. See [Issue #55](https://github.com/wxt-dev/wxt/issues/55) to track progress.
|
||||
@@ -104,6 +104,22 @@ Finally, add scripts to your `package.json`:
|
||||
}
|
||||
```
|
||||
|
||||
## Migrate an Existing Project
|
||||
|
||||
Before starting the migration, it is recommended to run `pnpx wxt@latest init` to see what a basic project looks like. Once you have an understanding of how WXT projects are structured, you're ready to convert the project, using the initialized project as a reference.
|
||||
|
||||
Migrating a project to WXT comes down to a few steps:
|
||||
|
||||
1. Install WXT and remove any old build tools: `pnpm i -D wxt`
|
||||
1. Refactoring/move your entrypoints to the `entrypoints` directory
|
||||
1. Moving public assets to the `public` directory
|
||||
1. Update the dev and build scripts to use WXT
|
||||
1. Ensure project is compatible with Vite, which is used under the hood to bundle your extension
|
||||
|
||||
:::info
|
||||
Since projects vary greatly in setup, [start a discussion on GitHub](https://github.com/wxt-dev/wxt/discussions/new/choose) if you need help migrating your project to WXT.
|
||||
:::
|
||||
|
||||
## Development
|
||||
|
||||
Once you've installed WXT, you can start the development server using the `dev` script.
|
||||
|
||||
Reference in New Issue
Block a user