1if (condition) { 2 import('./my-other-module.js') 3 .then(myOtherModule => { 4 // Module was loaded successfully and can 5 // now be used here. 6 }) 7 .catch(err => { 8 // An error occurred that needs to be handled here. 9 console.error(err);10 });11}