microsoft / tslib

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

Update package.json #162

Closed jogibear9988 closed 2 years ago

rbuckton commented 2 years ago

tslib.es6.js predates NodeJS's support for ES Modules. If you change the "import" directive in the export map as you've proposed, NodeJS will attempt to load the file as a CommonJS module, resulting in the following error:

SyntaxError Unexpected token 'export'

The tslib.es6.js file can be used in the browser, but not in NodeJS.