aklinker1 / vite-plugin-web-extension

Vite plugin for developing Chrome/Web Extensions
https://vite-plugin-web-extension.aklinker1.io/
MIT License
574 stars 48 forks source link

feat(react): add tsx extension in scriptExtensions #30

Closed xiz0r closed 2 years ago

xiz0r commented 2 years ago

Problem

I try to add the react content script application in my manifest.json but when I add the reference to the .tsx file this does not work.

Solution

The solution I have found is to inject my content-script from the background script. I have added .tsx to scriptExtensions so that tsx files included in additionalInputs are treated as scripts.

aklinker1 commented 2 years ago

Thanks for the PR! This has been published in v1.4.0