inversify / InversifyJS

A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
http://inversify.io/
MIT License
11.16k stars 713 forks source link

Documentation about reflect-metadata is now misleading #1139

Open terrybondy opened 5 years ago

terrybondy commented 5 years ago

The documentation at https://github.com/inversify/InversifyJS/blob/master/wiki/environment.md contains the following note:

:warning: The reflect-metadata polyfill should be imported only once in your entire application because the Reflect object is mean to be a global singleton. More details about this can be found here.

Related issues in the dependency: #80 - metadata seemingly erased when using multiple files with karma,mocha,webpack #78 - Error when working with another polyfill, like core-js/reflect #45 - When installed redundantly, Metadata could be erased

seem to have been fixed (https://github.com/rbuckton/reflect-metadata/releases/tag/v0.1.12) in a previously used version of the dependency.

Expected Behavior

No note required.

Current Behavior

Has note.

Possible Solution

Remove note.

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

Stack trace

zanminkian commented 1 year ago

Can't agree more. The newest version of reflect-metadata, which has been released for more than 4 year, can be imported more than once.