abhijithvijayan / web-extension-starter

🖥🔋Web Extension starter to build "Write Once Run on Any Browser" extension
MIT License
1.97k stars 169 forks source link

Migration to ESBuild from Babel #74

Open id3vz opened 2 years ago

id3vz commented 2 years ago

I'm using the React + TypeScript branch and using React in ContentScript, When I make any change in the react files it takes about 40 seconds until I can see the change in the browser and the page reloaded. How to make it faster as 40 seconds is too much?

abhijithvijayan commented 2 years ago

It doesnt really take 40seconds on my machine.

But I will consider migrating to esbuild from babel.

Will keep this issue open for now.

abhijithvijayan commented 2 years ago

This is do-able but the problem could be with support for old browsers(as I am not sure if ESBuild is somewhat flexible to Babel's browser version specific bundles) So this could mean dropping support for older browsers.

Currently the manifest v3 upgrade might need to drop support for old browsers ( Chrome < 88 ). If that is the case, I will surely consider doing this too. For now I think Keeping Babel is fine. But if anyone needs it be be switched with Esbuild, there is a webpack loader for that, feel free to use it.