Title: `*.cjs` extension files served as text/plain · Issue #355 · unpkg/unpkg · GitHub
Open Graph Title: `*.cjs` extension files served as text/plain · Issue #355 · unpkg/unpkg
X Title: `*.cjs` extension files served as text/plain · Issue #355 · unpkg/unpkg
Description: 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...
Open Graph Description: 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 ...
X Description: 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 ...
Opengraph URL: https://github.com/unpkg/unpkg/issues/355
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`*.cjs` extension files served as text/plain","articleBody":"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](https://nodejs.org/api/modules.html#enabling) incorrectly.\r\n\r\nInstead of `text/plain`, the `content-type` of `.cjs` files should be `application/javascript`.\r\n\r\nNode's documentation can serve as reference for the honoring of these files: https://nodejs.org/api/modules.html#enabling","author":{"url":"https://github.com/Swivelgames","@type":"Person","name":"Swivelgames"},"datePublished":"2023-03-15T04:15:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/355/unpkg/issues/355"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2bd9ec63-28db-a3d8-7b21-c58da86cee6a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A502:512E3:27129E4:3644BCD:6A4EF86D |
| html-safe-nonce | 9cc2c6a82f09e4cf908a6a0b958a4850d7d4fdbe515f49ac63e44876063a4229 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTAyOjUxMkUzOjI3MTI5RTQ6MzY0NEJDRDo2QTRFRjg2RCIsInZpc2l0b3JfaWQiOiI1OTU5MDYyODA5MDk0MzIyMjg1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 578a96745dce5175a2a8578b9cbfca0a082a9f7064bc7ece59e31c6752907c59 |
| hovercard-subject-tag | issue:1624709554 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/unpkg/unpkg/355/issue_layout |
| twitter:image | https://opengraph.githubassets.com/69f8ba4bd1ecb28121bee16f6a19385c30c9f8226ba05c016be63220b2bb413b/unpkg/unpkg/issues/355 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/69f8ba4bd1ecb28121bee16f6a19385c30c9f8226ba05c016be63220b2bb413b/unpkg/unpkg/issues/355 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Swivelgames |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/unpkg/unpkg git https://github.com/unpkg/unpkg.git |
| octolytics-dimension-user_id | 16924415 |
| octolytics-dimension-user_login | unpkg |
| octolytics-dimension-repository_id | 52242422 |
| octolytics-dimension-repository_nwo | unpkg/unpkg |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 52242422 |
| octolytics-dimension-repository_network_root_nwo | unpkg/unpkg |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width