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

Popup fails to Render JSX content #761

Closed dojoVader closed 1 year ago

dojoVader commented 1 year ago

Build tool

Rollup

Where do you see the problem?

Describe the bug

I am using React tsx for the popup, this works in Webpack, but with Vite, it renders the JSX equivalent in a

 tag.
image

Reproduction

  1. Setting up the Default project from vite-plugin "@crxjs/vite-plugin": "1.0.14",
  2. run npm run dev
  3. Click on the Popup

Logs

Chrome Version 114.0.5735.198 (Official Build) (64-bit)
Vite 2.9.15

System Info

System:
    OS: Linux 6.2 Ubuntu 23.04 23.04 (Lunar Lobster)
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
    Memory: 1.05 GB / 15.34 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 17.0.1 - ~/.nvm/versions/node/v17.0.1/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v17.0.1/bin/npm
  Browsers:
    Chrome: 114.0.5735.198
  npmPackages:
    @crxjs/vite-plugin: ^1.0.14 => 1.0.14 
    vite: 2.9.15 => 2.9.15

Severity

blocking all usage of RPCE

dojoVader commented 1 year ago

I forgot to load the React component as a module in an index.html apologies