1
0
Fork 0
freesewing/markdown/dev/reference/terms/cjs/en.md
2024-02-17 19:55:56 +01:00

497 B

title
cjs

cjs stands for CommonJS. It is a module system for JavaScript that was popularized by NodeJS, and as such typically used in server-side JavaScript.

CommonJS uses the require keyword to import modules:

const fs = require('fs')

In recent years, cjs is increasingly being replaced by esm, or ECMA Script Modules which is the official module system of the JavaScript language, and the future-proof choice.

Since version 3, FreeSewing is ESM-only.