Using ES6 modules, I know I can use named imports
import { foo as bar } from 'my-module';
And I know that I can import default imports
import defaultMember from 'my-module';
I would like to have a default import alias, and I thought the following would work
import defaultMember as alias from 'my-module';
but this leads to a parsing error.
How can I (or can?) Import an alias by default?
javascript ecmascript-6 es6-modules
sfletche Sep 01 '16 at 23:24 2016-09-01 23:24
source share