Skip to content

Commit

Permalink
Merge pull request #1229 from remarkablemark/fix/esm
Browse files Browse the repository at this point in the history
fix(esm): make ESM exports explicit in index.mjs and utilities.mjs
  • Loading branch information
remarkablemark authored Dec 18, 2023
2 parents a34b757 + 3e0fd2b commit 6ac2d12
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": ["@commitlint/config-conventional"],
"rules": {
"body-max-line-length": [1, "always", 100],
"footer-max-line-length": [1, "always", 100],
"type-empty": [2, "never"]
}
}
10 changes: 9 additions & 1 deletion esm/index.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
import HTMLReactParser from '../lib/index.js';

export * from '../lib/index.js';
export {
Comment,
Element,
ProcessingInstruction,
Text,
attributesToProps,
domToReact,
htmlToDOM,
} from '../lib/index.js';

export default HTMLReactParser.default || HTMLReactParser;
9 changes: 8 additions & 1 deletion esm/utilities.mjs
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
export * from '../lib/utilities.js';
export {
isCustomComponent,
setStyleProp,
PRESERVE_CUSTOM_ATTRIBUTES,
ELEMENTS_WITH_NO_TEXT_CHILDREN,
canTextBeChildOfNode,
returnFirstArg,
} from '../lib/utilities.js';

0 comments on commit 6ac2d12

Please sign in to comment.