Closed aluanhaddad closed 7 years ago
Lgtm //cc @frankwallis On Fri, 17 Mar 2017 at 03:57, Aluan Haddad notifications@github.com wrote:
This allows for correct loading of tslib under jspm 0.17/SystemJS 0.20 while preserving compatibility with jspm 0.16/SystemJS 0.19. See related discussion in #1040 https://github.com/jspm/registry/pull/1040, #1041 https://github.com/jspm/registry/pull/1041, and Microsoft/tslib#26 https://github.com/Microsoft/tslib/issues/26.
You can view, comment on, or merge this pull request online at:
https://github.com/jspm/registry/pull/1043 Commit Summary
- add esModule marker for compatibility with SystemJS 0.20
File Changes
- M package-overrides/npm/tslib@1.0.0.json https://github.com/jspm/registry/pull/1043/files#diff-0 (7)
Patch Links:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jspm/registry/pull/1043, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkiysOatNnHqrlUXql6yfibmmjBUnBpks5rmeiGgaJpZM4MgFx9 .
@frankwallis any chance you can take a look at this?
LGTM - in fact I thought I had already done this in the last commit but it appears not, maybe I just added a local override.
@frankwallis, @guybedford I've found this does not work correctly when running jspm bundle in 0.17
Specifically, the esModule
metadata seems to be ignored. In browser transpilation works perfectly.
@aluanhaddad thanks for letting me know. It would help to know how it is being ignored in the bundling process. Does it fail bundling? Or does it not get included in the package config in the bundle itself?
@guybedford Sorry for not being more specific.
The bundling process completes successfully and the bundle in turn contains the full package config.
The error happens at runtime. The named exports of tslib are not available on the imported module when the bundle is executed. It only exposes the default
.
@aluanhaddad thanks for the clarification, in that case it sounds like this might be resolved by https://github.com/systemjs/builder/issues/775, which would ensure the bundle includes the esModule
flag.
This allows for correct loading of tslib under jspm 0.17/SystemJS 0.20 while preserving compatibility with jspm 0.16/SystemJS 0.19. See related discussion in #1040, #1041, and https://github.com/Microsoft/tslib/issues/26.
I have tested this under jspm@0.17.41 with SystemJS@0.20.10 and under jspm@0.16.53 with SystemJS@0.19.46.