What is commonjs2 ?
See original GitHub issueSorry if that’s obvious but it’s been eating me for multiple days and even grep
ing commonjs2 through this repository I couldn’t find any obvious information.
My google-fu on commonjs2 led me back to https://github.com/webpack/webpack/issues/864 … which was not helpful.
Anyone could explicitely inform me what is commonjs2, the differences with commonjs, and what is the relation with webpack ?
Thanks …
Issue Analytics
- State:
- Created 8 years ago
- Reactions:86
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Output - webpack
Wondering the difference between CommonJS and CommonJS2 is? While they are similar, there are some subtle differences between them that are not usually ......
Read more >Sibelius Seraphini on Twitter: "commonjs vs commonjs2 on ...
CommonJs spec defines only exports. But module.exports is used by node.js and many other CommonJs implementations. commonjs mean pure ...
Read more >CommonJS - Wikipedia
CommonJS is a project with the goal to establish conventions on the module ecosystem for JavaScript outside of the web browser. The primary...
Read more >Understanding the Webpack Dynamics | by Param Singh
Support for all popular module systems — ES6, AMD, CommonJS, CommonJS2, UMD. Development tools like Hot reloading, dev server; Code splitting ...
Read more >Webpack's TemplatePlugin - Tan Li Hau
commonjs2 uses module.exports to export values from a module. In this example, webpack assigns the return value of the IIFE to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
CommonJs spec defines only
exports
. Butmodule.exports
is used by node.js and many other CommonJs implementations.commonjs
mean pure CommonJscommonjs2
also includes themodule.exports
stuff.Are there other commonjs implementations that do not use
module.exports
which need to be supported by webpack? Now that I understand what the two optionscommonjs
andcommonjs2
are, I would like to understand if there is a practical use case forcommonjs
.