require() is a bit weird for riot-web's webpack, so we fork it out to its own function to reduce the weirdness.
The added weirdness is that require() is sync though exports a module instead. If we use import(), we get a promise which doesn't help us here. We therefore have to require() and pull out the default export, though this is only a problem for webpack - babel (our chosen compiler for exporting ES6) doesn't need this, hence the if statement.
This is to make the "Enable desktop notifications" checkbox accurately reflect the user's preference. The device-level setting is still respected.
Signed-off-by: Travis Ralston <travpc@gmail.com>