diff --git a/index.mjs b/index.mjs new file mode 100644 index 0000000..db84199 --- /dev/null +++ b/index.mjs @@ -0,0 +1,2 @@ +import ReactJsonView from './dist/main.js' +export default ReactJsonView.default || ReactJsonView diff --git a/package.json b/package.json index e861277..f32eafc 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,15 @@ "version": "1.31.8", "types": "index.d.ts", "main": "dist/main.js", + "module": "index.mjs", + "exports": { + ".": { + "import": "./index.mjs", + "require": "./dist/main.js", + "default": "./dist/main.js" + }, + "./package.json": "./package.json" + }, "author": { "name": "Mac Gainor" }, @@ -324,7 +333,8 @@ }, "files": [ "dist", - "index.d.ts" + "index.d.ts", + "index.mjs" ], "scripts": { "build": "NODE_OPTIONS=--openssl-legacy-provider NODE_ENV=production webpack --config webpack/webpack.config.js --progress",