Skip to content

Commit aa0cfc4

Browse files
committed
fix: include explicit internal.d.ts file to fix node10 resolution on internal
1 parent 4dcd0b5 commit aa0cfc4

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

internal.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line import/extensions
2+
export * from './dist/internal.js'

package.json

+18-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
11
{
22
"name": "@netlify/functions",
33
"main": "./dist/main.js",
4-
"types": "./dist/main.d.ts",
54
"type": "commonjs",
65
"exports": {
76
".": {
8-
"import": "./dist/main.mjs",
9-
"require": "./dist/main.js"
7+
"require": {
8+
"types": "./dist/main.d.ts",
9+
"default": "./dist/main.js"
10+
},
11+
"import": {
12+
"types": "./dist/main.d.mts",
13+
"default": "./dist/main.mjs"
14+
}
1015
},
1116
"./internal": {
12-
"import": "./dist/internal.mjs",
13-
"require": "./dist/internal.js"
17+
"require": {
18+
"types": "./dist/internal.d.ts",
19+
"default": "./dist/internal.js"
20+
},
21+
"import": {
22+
"types": "./dist/internal.d.mts",
23+
"default": "./dist/internal.mjs"
24+
}
1425
}
1526
},
1627
"version": "2.6.1",
@@ -19,7 +30,8 @@
1930
"dist/**/*.js",
2031
"dist/**/*.mjs",
2132
"dist/**/*.d.ts",
22-
"dist/**/*.d.mts"
33+
"dist/**/*.d.mts",
34+
"internal.d.ts"
2335
],
2436
"scripts": {
2537
"build": "tsup src --format esm,cjs --dts --clean",

0 commit comments

Comments
 (0)