Skip to content

Commit 230de70

Browse files
build(index): fix rollup error of mixing named and default exports
``` (!) Mixing named and default exports Consumers of your bundle will have to use bundle['default'] to access the default export, which may not be what you want. Use `output.exports: 'named'` to disable this warning ``` This fixes the UMD bundle (in `dist`) as the library can only be accessed via the default export.
1 parent a04ef27 commit 230de70

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

index.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ function HTMLReactParser(html, options) {
1919
return domToReact(htmlToDOM(html, domParserOptions), options);
2020
}
2121

22-
/**
23-
* Export HTML to React parser.
24-
*/
25-
module.exports = HTMLReactParser;
22+
HTMLReactParser.domToReact = domToReact;
23+
HTMLReactParser.htmlToDOM = htmlToDOM;
2624

27-
module.exports.domToReact = domToReact;
28-
module.exports.htmlToDOM = htmlToDOM;
25+
module.exports = HTMLReactParser;

0 commit comments

Comments
 (0)