module.exports = Promise.all([
import('foo'),
import('bar')
]).then(([foo, bar]) => {
// This code is bundled into the top-level bundle
someFunction() {
// this code is not bundled into the top-level bundle
import('baz');
}
});