Is it possible to pass options to ES6 imports?
How do you translate this:
var x = require(\'module\')(someoptions);
to ES6?
Here's my take on this question using the debug module as an example;
On this module's npm page, you have this:
var debug = require('debug')('http')
In the line above, a string is passed to the module that is imported, to construct. Here's how you would do same in ES6
import { debug as Debug } from 'debug' const debug = Debug('http');
Hope this helps someone out there.