Replace Vue with React
id3vz opened this issue · comments
id3vz commented
Thanks for this great work!
Is there any way to replace Vue with React?
Anthony Fu commented
Should be straight forward to change the two main.ts to react dom and replace vite plugin in vite.config.ts
Max commented
I think its not that straight forward, because of error: 'vite-plugin-react can't detect preamble. Something is wrong'. Actually this error linked to this PR, but it is not clear how to solve in our case
Sergey commented
https://github.com/quolpr/react-vite-webext
I made the react version, but I disabled HMR. It is still fixable though, I am going to fix it later
Jack Steam commented
Best quick solution is to disable fast refresh in the react plugin:
// vite.config.ts
react({ fastRefresh: false })
This doesn't require the inline script.