crxjs / chrome-extension-tools

Bundling Chrome Extensions can be pretty complex. It doesn't have to be.
https://crxjs.dev/vite-plugin
2.9k stars 192 forks source link

@crxjs/vite-plugin build err #444

Closed yvywang closed 2 years ago

yvywang commented 2 years ago

Build tool

Vite

Where do you see the problem?

Describe the bug

image

it's amazing, I didn't find this line in the source code, but it was in the compiled production. When I delete it, it works

Reproduction

https://github.com/yvywang/test-vite-crx

Logs

[crx:content-script-resources] TypeError: Cannot read properties of undefined (reading 'split')
 ERROR  [crx:manifest-post] Error in crx:content-script-resources.renderCrxManifest

System Info

System:
    OS: macOS 12.2.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 88.81 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 7.19.1 - ~/.nvm/versions/node/v16.13.1/bin/npm
  Browsers:
    Chrome: 103.0.5060.53
    Safari: 15.3
  npmPackages:
    @crxjs/vite-plugin: ^1.0.12 => 1.0.12
    vite: ^2.9.12 => 2.9.12

Severity

blocking all usage of RPCE

billyant24 commented 2 years ago

Same thing here. Can not build for production when using pattern

yvywang commented 2 years ago

ye, use "matches": ["http://*/*", "https://*/*"], that's ok