diff --git a/integration/utils.js b/integration/utils.js index c2265851..6bcce6cb 100644 --- a/integration/utils.js +++ b/integration/utils.js @@ -1,4 +1,4 @@ -import { compute } from '../dist/index.js' +import { compute } from '../dist/index.mjs' window.computeScrollIntoView = compute window.mapActions = (item) => ({ diff --git a/package.json b/package.json index b750a270..0e41dc11 100644 --- a/package.json +++ b/package.json @@ -20,19 +20,20 @@ "license": "MIT", "author": "Cody Olsen", "sideEffects": false, - "type": "module", + "type": "commonjs", "exports": { ".": { "types": "./dist/index.d.ts", "source": "./src/index.ts", - "import": "./dist/index.js", - "require": "./dist/index.cjs", + "require": "./dist/index.js", + "import": "./dist/index.mjs", "default": "./dist/index.js" }, "./package.json": "./package.json" }, - "main": "./dist/index.cjs", - "module": "./dist/index.js", + "source": "./src/index.ts", + "main": "./dist/index.js", + "module": "./dist/index.mjs", "typings": "./dist/index.d.ts", "files": [ "dist", diff --git a/tsconfig.json b/tsconfig.json index c9596f5e..071fb1ac 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "esnext", "module": "esnext", - "moduleResolution": "node", + "moduleResolution": "nodenext", "declaration": true, "rootDir": "src", "outDir": "dist", @@ -13,6 +13,7 @@ "skipLibCheck": true, "noUnusedLocals": true, "noUnusedParameters": true, + "esModuleInterop": true, "strict": true, "lib": ["dom", "dom.iterable", "esnext"] },