If assets are annotated with both their imported and exported specifiers (including default), this would enable validation of dependencies during the build, rather than relying on vague runtime failures for detection (eg: _lodash["somefunc"] is not a function`).
Issues:
how to reconcile against commonjs imports? Fail silently? How to detect if a module uses es modules, or commonjs, or both?
when should specifiers be extracted? before babel transformation or after? both? if both, how to merge and handle specifiers that were removed?
If assets are annotated with both their imported and exported specifiers (including
default
), this would enable validation of dependencies during the build, rather than relying on vague runtime failures for detection (eg:_lodash["somefunc"]
is not a function`).Issues: