How are ES Modules different from CommonJS modules?
ES6 modules use the import keyword with the functions or classes that have been exported then the from keyword and a relative path to the file or directory. CommonJS modules use require(‘export name’) and assign that to constant variables for imports. For exports module.exports = {
prop1: func1,
}
CommonJS is community supported and ES Modules are browser supported.
What kind of modules can Webpack support?
ECMAScript modules, CommonJS modules, and AMD modules.