From ca0340a25e9c9c56758656b3352267ade7e37a21 Mon Sep 17 00:00:00 2001 From: David Bailey Date: Fri, 15 Jan 2021 00:06:46 +0000 Subject: [PATCH] feat(package): add es module entry point --- index.mjs | 4 ++++ package.json | 1 + 2 files changed, 5 insertions(+) create mode 100644 index.mjs 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",