CommonJS
Kevin Dangoor가 조직한 그룹
require, module.export 방식
node 진영 공식 모듈 방식
const doSomething = require('./doSomething.js'); //exporting module.exports = function doSomething(n) { // do something }
- CJS imports module synchronously
- it will give you a copy of the imported object
- CJS will not work in the browser
- It will have to be transpiled and bundled