File: export-commonjs-files.patch

package info (click to toggle)
node-md5-hex 4.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 152 kB
  • sloc: javascript: 44; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 596 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: export commonjs files
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2022-02-21

--- a/package.json
+++ b/package.json
@@ -10,9 +10,11 @@
 		"email": "sindresorhus@gmail.com",
 		"url": "https://sindresorhus.com"
 	},
-	"type": "module",
+	"main": "./index.cjs",
+	"module": "./index.js",
 	"exports": {
-		"node": "./index.js",
+		"import": "./index.js",
+		"require": "./index.cjs",
 		"default": "./browser.js"
 	},
 	"engines": {
@@ -22,6 +24,7 @@
 		"test": "xo && ava && tsd"
 	},
 	"files": [
+		"index.cjs",
 		"index.js",
 		"index.d.ts",
 		"browser.js"