Polymer / pwa-starter-kit

Starter templates for building full-featured Progressive Web Apps from web components.
https://pwa-starter-kit.polymer-project.org
2.36k stars 431 forks source link

Question about dynamic imports as implemented in src/actions/app.js #359

Closed schevtso closed 4 years ago

schevtso commented 5 years ago

I have a question about the function loadPage() in https://github.com/Polymer/pwa-starter-kit/blob/master/src/actions/app.js.

On each of the lines 32, 38, 41, and 45, a module is imported dynamically via a call to import(), which returns a Promise. Those Promises might, hypothetically, take a long time to resolve.

Why doesn't the code wait for the import() calls to resolve? In other words, shouldn't the proper calls be: await import('...'); ?

logicalphase commented 5 years ago

Good question I use await import('...') in my apps. Did something change that makes removing that an advantage.

stale[bot] commented 4 years ago

This project is no longer under development and will be transitioning to a read-only repo. Thank you for your contributions.