Here's a toolkit for building widgets using ES6: https://github.com/JelteMX/generator-mendix-widget
And here's a widget that was built using the toolkit: https://github.com/mendix/Leaflet