crxjs / chrome-extension-tools

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

Content script not picked up in React TS project #408

Closed LookRain closed 2 years ago

LookRain commented 2 years ago

Build tool

Vite

Where do you see the problem?

Describe the bug

I followed the guide on how to enable content script in a normal React Vite project, the content script was picked up correctly.

However, when I tried with React-ts, it doesn't seem to work.

Is TypeScript support in the plans?

Thanks!

Reproduction

image

the content script location is not replaced in the dist/manifest.json file

Logs

No response

System Info

System:
    OS: macOS 12.4
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 167.98 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 14.19.3 - /usr/local/bin/node
    Yarn: 1.22.15 - /usr/local/bin/yarn
    npm: 6.14.17 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 102.1.39.111
    Chrome: 102.0.5005.61
    Safari: 15.5
  npmPackages:
    @crxjs/vite-plugin: ^1.0.8 => 1.0.8
    vite: ^2.9.9 => 2.9.9

Severity

blocking all usage of RPCE

LookRain commented 2 years ago

sorry there's a typo. it should be content_scripts not content-scripts.

how stupid am i

jacksteamdev commented 2 years ago

@LookRain No worries, we all make typos!

jerlam06 commented 1 year ago

Well, I don't have any typo and I actually have the exact same issue.

thecooltechguy commented 1 year ago

Same, I don't have a typo either and I'm facing the same issue.