microsoft / tslib

Runtime library for TypeScript helpers.
BSD Zero Clause License
1.26k stars 128 forks source link

feat: support Node.js ES modules via conditional exports #119

Closed vikerman closed 4 years ago

vikerman commented 4 years ago

Copies tslib.mjs file from tslib.es6.js as part of prepare script.

This change should only affect Node when used with ES modules since the .mjs files is referenced only in conditional export and should be safer.

Resolves #81; closes #84

87 renames the CJS version to .cjs extension which could potentially break existing bundling/serving tools.

Creating a symbolic link doesn't work since npm package doesn't support it.

ghost commented 4 years ago

CLA assistant check
All CLA requirements met.

guybedford commented 4 years ago

In https://github.com/microsoft/tslib/pull/121 I included the ./ export for backwards compatibility on this.

orta commented 4 years ago

This is in with #126