webpack issue 的回答:https://github.com/webpack/webpack/issues/1114
CommonJs spec defines only
exports
. Butmodule.exports
is used by node.js and many other CommonJs implementations.
commonjs mean pure CommonJs
commonjs2 also includes themodule.exports
stuff.
CommonJS 只有 export
CommonJS2 有 export 和 module.export