minor fixes

This commit is contained in:
Ilya Kantor 2021-05-24 11:34:23 +03:00
parent 2fc7cb2d42
commit 649a1598f5

View file

@ -184,7 +184,9 @@ As you can see, when `1.js` changes the `name` property in the imported `admin`,
That's exactly because the module is executed only once. Exports are generated, and then they are shared between importers, so if something changes the `admin` object, other modules will see that. That's exactly because the module is executed only once. Exports are generated, and then they are shared between importers, so if something changes the `admin` object, other modules will see that.
Such behavior allows us to *configure* modules on first import. We can setup its properties once, and then in further imports it's ready. **Such behavior is great in practice, because it allows us to *configure* modules on first import.**
We can setup its properties once, and then in further imports it's ready.
For instance, the `admin.js` module may provide certain functionality, but expect the credentials to come into the `admin` object from outside: For instance, the `admin.js` module may provide certain functionality, but expect the credentials to come into the `admin` object from outside: