You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
External modules with AMD always requires "exports" even when it is not used #669
This feels like bad AMD since you are requiring the "exports" magic dependency, but then not using it and instead returning Foo directly.
It's annoying for minimal AMD loaders since they can't assume the object return of your module is your "exports" object and have to guess that you really meant to return something that overrode the "exports" object you asked for.
Furthermore, why bother declaring a dependency on 'require' when it's not used?
AmandaO (@amandaol) the tags on the issue indicate that it is up to the community to implement. Coupled with the issue still being open means that the it hasn't been implemented.
Activity
RyanCavanaugh commentedon Sep 15, 2014
Seems like a reasonable proposal
RyanCavanaugh commentedon Apr 27, 2015
Approved
RoyTinker commentedon Jul 4, 2017
SO question I asked regarding this: https://stackoverflow.com/questions/44836084/omit-require-and-exports-from-typescript-emitted-amd-dependencies
amandaol commentedon Nov 30, 2018
Has this been implemented yet? I need it...
kitsonk commentedon Nov 30, 2018
AmandaO (@amandaol) the tags on the issue indicate that it is up to the community to implement. Coupled with the issue still being open means that the it hasn't been implemented.
RoyTinker commentedon Dec 1, 2018
For what it's worth, we now use
amdextractin our build pipeline aftertscto remove the unnecessaryrequireandexportsfrom emitted JS.https://github.com/mehdishojaei/amdextract