nklayman / vue-cli-plugin-electron-builder

Easily Build Your Vue.js App For Desktop With Electron
https://nklayman.github.io/vue-cli-plugin-electron-builder/
MIT License
4.12k stars 280 forks source link

Fill electron version in browserslist #224

Open omairabdullah opened 5 years ago

omairabdullah commented 5 years ago

Is your feature request related to a problem? Please describe. If Vue uses babel, then browserslist is generated with a generic configuration which is inefficient.

Describe the solution you'd like We know the browser we will be supporting (electron). Write the specific version of electron in browserslist to target that specific version.

e.g. .browserslistrc should contain Electron >= 4.0.0

This should generate code with less polyfills.

Describe alternatives you've considered Manually edit the browserslist.

Additional context Add any other context or screenshots about the feature request here.

nklayman commented 5 years ago

Your app is built with modern mode enabled. I believe this disables ES5 polyfills. There may be a small number of polyfills that aren't necessary for electron. I will have to do more research to see if it would help to set the browserlist to the electron version.