Skip to main content

One post tagged with "programming"

View All Tags

Octo in CJS

· One min read
Rahul Chaudhary
Maintainer
Banner

In Node, there are now two kinds of scripts: there are old-style CommonJS (CJS) scripts and new-style ESM scripts (aka MJS). CJS scripts use require() and module.exports; ESM scripts use import and export.

Octo exclusively supports ESM modules, requiring "type": "module" in package.json. In this article we will explore how to modify Octo imports to make them work in CJS.