jspm / generator

JSPM Import Map Generator
Apache License 2.0
166 stars 21 forks source link

Preload option for excluding dynamic imports #135

Closed guybedford closed 2 years ago

guybedford commented 2 years ago

Currently preload will include preloads for dynamic imports which can result in a slower page since everything is being preloaded even what is being requested lazily.

We should reconsider this default, or more clearly have variations of the preload option to optionally include dynamic import preloading.

guybedford commented 2 years ago

There was a bug here resulting in incorrect inclusions. This is fixed in https://github.com/jspm/generator/pull/134.

By default htmlGenerate will now only do static preloads. Setting preload = 'all' will then do dynamic import preloading.