if (condition) {
    import('something')
    .then((something) => {
       console.log(something.something);
    });
}