wxt-dev / wxt

⚡ Next-gen Web Extension Framework
https://wxt.dev
MIT License
4.53k stars 189 forks source link

WXT directories are not case-sensetive #953

Closed aklinker1 closed 2 months ago

aklinker1 commented 2 months ago

Describe the bug

You can create a file at src/Modules/xyz.ts, and it will be discovered as a module, when only file in src/modules should be discovered.

Discovered in https://github.com/wxt-dev/wxt/discussions/950#discussioncomment-10512337

Reproduction

repro.zip

Steps to reproduce

pnpm i

The log should not be printed, but it is.

System Info

System:
    OS: macOS 14.2.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 2.66 GB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.3 - ~/.asdf/installs/nodejs/18.20.3/bin/node
    Yarn: 1.22.22 - ~/.asdf/installs/nodejs/18.20.3/bin/yarn
    npm: 10.7.0 - ~/.asdf/plugins/nodejs/shims/npm
    pnpm: 9.9.0 - ~/.asdf/installs/nodejs/18.20.3/bin/pnpm
    bun: 1.1.22 - ~/.bun/bin/bun
  Browsers:
    Chrome: 128.0.6613.113
    Safari: 17.2.1

Used Package Manager

pnpm

Validations

aklinker1 commented 2 months ago

Here's the code that's returning the files inside Modules/ instead of just modules/:

https://github.com/wxt-dev/wxt/blob/61d54bd1f9eafcbe767c4a35126c1db8bce548b6/packages/wxt/src/core/utils/building/resolve-config.ts#L471-L474

aklinker1 commented 2 months ago

Hmm, caseSensitiveMatch is true by default...

aklinker1 commented 2 months ago

Not reproducible on Linux. Could reproduce on Mac, but the caseSensitiveMatch option didn't have an effect, so I'm closing this as an upstream issue.