Modern Node.js modules can be served as ESMs or CommonJS modules. These are differentiated either by their package.json, or by the extension of the file. It appears that unpkg properly serves .mjs files, but seems to treat *.cjs files as plaintext incorrectly.
Instead of text/plain, the content-type of .cjs files should be application/javascript.
Node's documentation can serve as reference for the honoring of these files: https://nodejs.org/api/modules.html#enabling