псевдоним импорт JavaScript
import {default as alias} from 'my-module';
Outstanding Ocelot
import {default as alias} from 'my-module';
// app.js
import { add } from './data';
console.log(add(2, 3));
// data.js
export const add = (x, y) => {
return x + y
}
import contact from './contact.js';
contact('Sara', 25);
// The name is Sara. And age is 25