Skip to content

Commit 128dc26

Browse files
committed
Change to use exports
1 parent e161c69 commit 128dc26

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
],
2727
"sideEffects": false,
2828
"type": "module",
29-
"main": "index.js",
30-
"types": "index.d.ts",
29+
"exports": "./index.js",
3130
"files": [
3231
"lib/",
3332
"index.d.ts",

test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import assert from 'node:assert/strict'
22
import test from 'node:test'
33
import {h} from 'hastscript'
4+
import {classnames} from 'hast-util-classnames'
45
import {u} from 'unist-builder'
5-
import {classnames} from './index.js'
66

77
test('classnames', async function (t) {
88
await t.test('should expose the public api', async function () {
9-
assert.deepEqual(Object.keys(await import('./index.js')).sort(), [
9+
assert.deepEqual(Object.keys(await import('hast-util-classnames')).sort(), [
1010
'classnames'
1111
])
1212
})

0 commit comments

Comments
 (0)