I have an existing require
:
const {dialog} = require(\'electron\').remote;
I started using Babel for ES6, and would like to
There is nothing 'ugly', it is how the things should be written in ES6.
import
s are supposed to be statically analyzed without script evaluation, supported syntax is limited. Default import can't be destructured in import
statement, all varieties of syntax are listed in the reference.
It can be written as
import electron from 'electron';
const { remote: { dialog } } = electron;