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