wxt-dev / wxt-dev/wxt

`wxt dev` watches the entire project directory instead of only relevant folders

Open
#1,733 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

pending-triage
Dominant language
TypeScript
Stars
10.5k
Forks
564
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When running wxt dev, it seems to watch (or at least read) the entire project directory. I noticed this because I store browser user profiles in a subfolder of the project:

// wxt.config.ts
export default defineConfig({
	webExt: {
		keepProfileChanges: true,
		chromiumProfile: fs.realpathSync(".profile/chrome"),
		firefoxProfile: fs.realpathSync(".profile/firefox")
	},
});

This is a problem — these profile folders are huge and unrelated to the build process, yet wxt touches them during development.

Since the config already defines specific directories like these:

export default defineConfig({
	srcDir: "src",
	modulesDir: "wxt-modules",
	outDir: "dist",
	publicDir: "static",
	entrypointsDir: "entries",
})

Why doesn't wxt just watch only these explicitly defined directories? Or at the very least, there should be an option to exclude certain paths from being watched.

Please fix this — watching the whole project is excessive and causes unnecessary performance issues.

Reproduction
// wxt.config.ts
export default defineConfig({
	webExt: {
		keepProfileChanges: true,
		chromiumProfile: fs.realpathSync(".profile/chrome"),
		firefoxProfile: fs.realpathSync(".profile/firefox")
	},
});
Steps to reproduce

No response

System Info
System:
    OS: Windows 11 10.0.26200
    CPU: (2048) x64 Ontel(R) Core(TM) i8-80999K CPU @ 99.6GHz
    Memory: 444.60 GB / 1023.92 GB
  Binaries:
    Node: 22.14.0 - E:\runtime\nodejs-bin\node-v22.14.0-win-x64\node.EXE
    Yarn: 1.22.21 - E:\runtime\nodejs-data\global\yarn.CMD
    npm: 11.1.0 - E:\runtime\nodejs-bin\node-v22.14.0-win-x64\npm.CMD
    pnpm: 7.26.3 - E:\runtime\nodejs-data\global\pnpm.CMD
  Browsers:
    Internet Explorer: 11.0.26200.5001
  npmPackages:
    wxt: ^0.20.6 => 0.20.7
Used Package Manager

npm

Validations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the shown wxt.config.ts and wxt dev, using the .profile directories as the irrelevant paths to observe. Trace the development watcher behavior and verify that configured project directories remain watched while browser profile folders are no longer scanned; confirm the result with a focused regression test if the repository provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
build-system, devtools, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.