-
Fork the repository.
-
Clone your forked repository to your local machine.
git clone https://github.com/${yourname}/NiceTab -
Create your feature branch
dev-your-awesome-codefrom thedevbranch.git checkout -b dev-your-awesome-code origin/dev
-
Commit your changes (follow commit message conventions).
git commit -m 'feat: add a new feature' -
Push your branch to your remote repository.
git push -u origin dev-your-awesome-code
-
Create a Pull Request from your
dev-your-awesome-codebranch to thedevbranch of web-dahuyou/NiceTab.https://github.com/web-dahuyou/NiceTab/compare/dev...${yourname}:NiceTab:dev-your-awesome-code
- Install dependencies:
pnpm install - Start the dev server:
pnpm run dev
Important: Each .js .ts .tsx file must have an export default statement. Otherwise, you'll encounter errors when running the local service.
By default, WXT will try to automatically discover where Chrome/Firefox are installed. If you encounter an error:
ERROR No Chrome installations found.
Or you want to specify a browser executable binary.
You can refer to the docs - Set Browser Binaries to manually configure the browser binary paths.
// <rootDir>/web-ext.config.ts
export default defineRunnerConfig({
binaries: {
chrome: '/path/to/chrome-beta', // Use Chrome Beta instead of regular Chrome
firefox: 'firefoxdeveloperedition', // Use Firefox Developer Edition instead of regular Firefox
edge: '/path/to/edge', // Open MS Edge when running "wxt -b edge"
},
});If you want to preserve user data between development sessions, you can persist data by following the official documentation - persist-data.
// <rootDir>/web-ext.config.ts
import { defineRunnerConfig } from 'wxt';
// Mac/Linux
export default defineRunnerConfig({
chromiumArgs: ['--user-data-dir=./.wxt/chrome-data'],
});
// Windows
import path from 'path';
export default defineRunnerConfig({
// On Windows, the path must be absolute
chromiumProfile: path.resolve('.wxt\\chrome-data'),
keepProfileChanges: true
})