Skip to content

Commit ce09a65

Browse files
committedDec 18, 2023
fix(esm): fix ESM types by adding .mts declaration files
1 parent dd0b253 commit ce09a65

File tree

7 files changed

+7
-20
lines changed

7 files changed

+7
-20
lines changed
 

‎esm/attributes-to-props.d.mts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '../lib/attributes-to-props';

‎esm/dom-to-react.d.mts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '../lib/dom-to-react';

‎esm/index.d.mts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from '../lib/index';
2+
export { default } from '../lib/index';

‎esm/index.mjs

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import HTMLReactParser from '../lib/index.js';
22

3-
export {
Has comments. Original line has comments.
4-
Comment,
5-
Element,
6-
ProcessingInstruction,
7-
Text,
8-
attributesToProps,
9-
domToReact,
10-
htmlToDOM,
11-
} from '../lib/index.js';
3+
export * from '../lib/index.js';
124

135
export default HTMLReactParser.default || HTMLReactParser;

‎esm/utilities.d.mts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '../lib/utilities';

‎esm/utilities.mjs

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
export {
2-
isCustomComponent,
3-
setStyleProp,
4-
PRESERVE_CUSTOM_ATTRIBUTES,
5-
ELEMENTS_WITH_NO_TEXT_CHILDREN,
6-
canTextBeChildOfNode,
7-
returnFirstArg,
8-
} from '../lib/utilities.js';
1+
export * from '../lib/utilities.js';

‎package.json

-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
"author": "Mark <mark@remarkablemark.org>",
66
"main": "./lib/index.js",
77
"module": "./esm/index.mjs",
8-
"types": "./lib/index.d.ts",
98
"exports": {
109
".": {
11-
"types": "./lib/index.d.ts",
1210
"import": "./esm/index.mjs",
1311
"require": "./lib/index.js"
1412
},
1513
"./lib/*": {
16-
"types": "./lib/*.d.ts",
1714
"import": "./esm/*.mjs",
1815
"default": "./lib/*.js"
1916
}

0 commit comments

Comments
 (0)
Please sign in to comment.