Skip to content

Build fails when the project's path contains + #2718

In review

Description

@namuorg

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

https://github.com/namuorg/wxt-plus-path-repro

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 extension

System 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

Activity

  1. added theissue type on Nov 2, 2026
  2. added
    pending-triage
    on Nov 2, 2026
  3. nishu-murmu commented on Nov 4, 2026

    @nishu-murmu
    Collaborator

    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.

  4. changed the title [-]Build fails when the project's path contains `+`: entrypoint filter regex isn't escaped[/-] [+]Build fails when the project's path contains `+`[/+] on Nov 4, 2026
  5. namuorg commented on Nov 4, 2026

    @namuorg
    ContributorAuthor

    Totally fair! I've edited the title and description to be shorter and I'll handwrite those going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending-triage

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions