Skip to content

Commit 1b8ddbf

Browse files
authored
Refactor to use import map
Closes GH-20. Reviewed-by: Titus Wormer <tituswormer@gmail.com>
1 parent 4246be3 commit 1b8ddbf

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Whether to include positional information.
1515
*/
1616

17-
import {color} from 'unist-util-inspect/do-not-use-conditional-color'
17+
import {color} from '#conditional-color'
1818

1919
/**
2020
* Inspect a node, with color in Node, without color in browsers.

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@
2626
"sideEffects": false,
2727
"type": "module",
2828
"exports": {
29-
".": "./index.js",
30-
"./do-not-use-conditional-color": {
29+
".": "./index.js"
30+
},
31+
"imports": {
32+
"#conditional-color": {
3133
"node": "./lib/color.node.js",
3234
"default": "./lib/color.default.js"
3335
}

0 commit comments

Comments
 (0)