First of all, thanks for great tool. It helps to solve a lot of things!
Unfortunately, we found that es-dev-server doesn't consider Electron container as a modern browser and so it inject polyfills when I serve the page.
Here is the error in the console.
Using auto compatibility mode, transforming code on older browsers based on user agent.
Resolved to invalid user agent: {"family":"Electron","version":"8.2.4"}. Using max compatibility mode. Try updating your dependencies, or file an issue with a reproduction.
I currently use -c none as a workaround but I wish that es-dev-server can support Electron out-of-the-box.
After a bit of digging in the code, I think it makes sense that UA is resolved as Electron family instead of Chrome family. The browserlist seems to be sensible that it doesn't recognise that Electron is in supporting browser list as technically it's Chrome. I'm not sure what the best solution would be but this may need to handle inside es-dev-server itself..
Hi Team,
First of all, thanks for great tool. It helps to solve a lot of things!
Unfortunately, we found that es-dev-server doesn't consider
Electron
container as a modern browser and so it inject polyfills when I serve the page.Here is the error in the console.
I currently use
-c none
as a workaround but I wish thates-dev-server
can support Electron out-of-the-box.After a bit of digging in the code, I think it makes sense that UA is resolved as
Electron
family instead ofChrome
family. Thebrowserlist
seems to be sensible that it doesn't recognise thatElectron
is in supporting browser list as technically it's Chrome. I'm not sure what the best solution would be but this may need to handle insidees-dev-server
itself..Here is a basic hello world project and when this project is run inside Electron, it will load polyfill. https://github.com/dtanp/simple-html