doc: add more detailed illustration for `module.exports` and `exports`.
Checklist
-
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
doc
Description of change
- Since there is an illustration for
The module wrapper
, themodule.exports
could be clearly explained with the logic of source code. - Add notice for avoid using
this
to export values in a module file.
- some
babel-plugin
, liketransform-es2015-modules-commonjs
will breakthis
toundefined
, sincethis
is undocumented, i thoughtbabel-plugin
is free to break, and user should not use it.