We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
/native
1 parent f46566f commit 4a917e5Copy full SHA for 4a917e5
lib/native.cjs
@@ -0,0 +1,11 @@
1
+const nodeFetch = require("../dist/native.cjs");
2
+
3
+function fetch(input, options) {
4
+ return nodeFetch.fetch(input, options);
5
+}
6
7
+for (const key in nodeFetch) {
8
+ fetch[key] = nodeFetch[key];
9
10
11
+module.exports = fetch;
package.json
@@ -59,6 +59,16 @@
59
"default": "./dist/node.cjs"
60
}
61
},
62
+ "./native": {
63
+ "import": {
64
+ "types": "./lib/index.d.mts",
65
+ "default": "./dist/native.mjs"
66
+ },
67
+ "require": {
68
+ "types": "./lib/index.d.cts",
69
+ "default": "./lib/native.cjs"
70
+ }
71
72
"./src/index.js": {
73
"import": {
74
"types": "./lib/index.d.mts",
@@ -101,4 +111,4 @@
101
111
"vitest": "^0.34.2"
102
112
103
113
"packageManager": "[email protected]"
104
-}
114
0 commit comments