Skip to content

doc: add more detailed illustration for `module.exports` and `exports`.

Rodrigo Muino Tomonari requested to merge github/fork/iamchenxin/mexports into master
Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change
  1. Since there is an illustration for The module wrapper, the module.exports could be clearly explained with the logic of source code.
  2. Add notice for avoid using this to export values in a module file.
  • some babel-plugin, like transform-es2015-modules-commonjs will break this to undefined, since this is undocumented, i thought babel-plugin is free to break, and user should not use it.

Merge request reports

Loading