diff --git a/package.json b/package.json index 33e9cf8..908213e 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,10 @@ ], "sideEffects": false, "type": "module", - "main": "index.js", - "types": "index.d.ts", + "exports": { + "types": "./index.d.ts", + "default": "./index.js" + }, "files": [ "lib/", "index.d.ts", diff --git a/test.js b/test.js index a4a6e81..74bb4e5 100644 --- a/test.js +++ b/test.js @@ -1,11 +1,11 @@ import assert from 'node:assert/strict' import test from 'node:test' import {VFile} from 'vfile' -import {location} from './index.js' +import {location} from 'vfile-location' test('location', async function () { assert.deepEqual( - Object.keys(await import('./index.js')).sort(), + Object.keys(await import('vfile-location')).sort(), ['location'], 'should expose the public api' )