diff --git a/index.mjs b/index.mjs new file mode 100644 index 00000000..4d853289 --- /dev/null +++ b/index.mjs @@ -0,0 +1,4 @@ +import HTMLReactParser from './index.js'; + +export default HTMLReactParser; +export const { domToReact, htmlToDOM, attributesToProps } = HTMLReactParser; diff --git a/package.json b/package.json index e200898a..f34cc4ab 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "HTML to React parser.", "author": "Mark ", "main": "index.js", + "module": "index.mjs", "scripts": { "benchmark": "node benchmark", "build": "rollup --config",