Skip to content

Commit d4ad5e1

Browse files
authored
fix: support —moduleResolution node16 (#882)
1 parent 6033f68 commit d4ad5e1

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

integration/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { compute } from '../dist/index.js'
1+
import { compute } from '../dist/index.mjs'
22
window.computeScrollIntoView = compute
33

44
window.mapActions = (item) => ({

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,20 @@
2020
"license": "MIT",
2121
"author": "Cody Olsen",
2222
"sideEffects": false,
23-
"type": "module",
23+
"type": "commonjs",
2424
"exports": {
2525
".": {
2626
"types": "./dist/index.d.ts",
2727
"source": "./src/index.ts",
28-
"import": "./dist/index.js",
29-
"require": "./dist/index.cjs",
28+
"require": "./dist/index.js",
29+
"import": "./dist/index.mjs",
3030
"default": "./dist/index.js"
3131
},
3232
"./package.json": "./package.json"
3333
},
34-
"main": "./dist/index.cjs",
35-
"module": "./dist/index.js",
34+
"source": "./src/index.ts",
35+
"main": "./dist/index.js",
36+
"module": "./dist/index.mjs",
3637
"typings": "./dist/index.d.ts",
3738
"files": [
3839
"dist",

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"target": "esnext",
44
"module": "esnext",
5-
"moduleResolution": "node",
5+
"moduleResolution": "nodenext",
66
"declaration": true,
77
"rootDir": "src",
88
"outDir": "dist",
@@ -13,6 +13,7 @@
1313
"skipLibCheck": true,
1414
"noUnusedLocals": true,
1515
"noUnusedParameters": true,
16+
"esModuleInterop": true,
1617
"strict": true,
1718
"lib": ["dom", "dom.iterable", "esnext"]
1819
},

0 commit comments

Comments
 (0)