What is the correct syntax to import both default
and named resource from an ES6 JavaScript module?
Example:
export const defaultBrowser = 'Chrome';
export default [
{ value: 0, label: defaultBrowser },
{ value: 1, label: 'Firefox' },
{ value: 2, label: 'Safari' },
{ value: 3, label: 'Edge' },
];
How would one import
that in one go?
It is not a duplicate of When should I use curly braces for ES6 import?, it is more specific, asking for a single import
use-case, and not an import
essay.