Repository navigation
Description
Note
I wrote this issue and the PR using AI but reviewed everything myself. If AI contributions aren't welcome, feel free to close. I love this project and have contributed PRs to wxt in the past without any AI so hopefully that'll provide some assurance that I'm not here to contribute slop. :P
Describe the bug
wxt build fails when the project's absolute path contains a regex metacharacter such as +, e.g. a git worktree named after a branch with a slash (Claude Code names the worktree for sync/foo .claude/worktrees/sync+foo). A content script with a top-level CSS import then fails with:
ERROR Cannot read properties of undefined (reading 'get')
at TransformPluginContext.handler (…/vite/dist/node/chunks/node.js:30071:48)
The same project builds in a path without +.
I've opened #2717 with a fix (escaping the path) and a unit test.
Reproduction
A content script that imports a CSS file, a background, and WXT 0.21.5. It fails when cloned into a directory whose path contains +, and builds otherwise.
Steps to reproduce
git clone https://github.com/namuorg/wxt-plus-path-repro wxt+plus
cd wxt+plus
npm install
npx wxt build # ERROR Cannot read properties of undefined (reading 'get')
cd ..
git clone https://github.com/namuorg/wxt-plus-path-repro wxt-plain
cd wxt-plain
npm install
npx wxt build # ✔ Built extensionSystem Info
System:
OS: macOS 27.0.1
CPU: (10) arm64 Apple M1 Max
Memory: 2.84 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 26.13.0
npm: 11.20.0
pnpm: 12.8.1
Browsers:
Chrome: 156.0.8078.79
Firefox: 157.0.1
npmPackages:
wxt: 0.21.5 => 0.21.5
vite: 8.3.5 (via wxt)Used Package Manager
npm
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Activity
nishu-murmu commentedon Nov 4, 2026
Chill man! you can use AI to contribute whether it be issue or PR, but thing is you need to write the description and title by yourself.
cause we're honestly exhausted by reading this long issues and PR descriptions.
[-]Build fails when the project's path contains `+`: entrypoint filter regex isn't escaped[/-][+]Build fails when the project's path contains `+`[/+]namuorg commentedon Nov 4, 2026
Totally fair! I've edited the title and description to be shorter and I'll handwrite those going forward.