Skip to content

Commit 7a1cdf4

Browse files
committed
Add .cjs mimetype to common_types
Adds .cjs mimetype of `text/javascript` for CommonJS modules to common_types. See here for more information: https://nodejs.org/api/modules.html#enabling
1 parent 248ce9f commit 7a1cdf4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Lib/mimetypes.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,7 @@ def _default_mime_types():
681681

682682
# Please sort these too
683683
common_types = _common_types_default = {
684+
'.cjs' : 'application/node',
684685
'.rtf' : 'application/rtf',
685686
'.apk' : 'application/vnd.android.package-archive',
686687
'.midi': 'audio/midi',
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add .cjs extension to common_types to give CommonJS modules a mimetype of
2+
"application/node"

0 commit comments

Comments
 (0)