From a542e174ff5ce672784f68aa44833292ffbeb5dc Mon Sep 17 00:00:00 2001 From: Mikey Gower Date: Wed, 3 Apr 2024 18:47:12 -0400 Subject: [PATCH] fix exports in package.json for v6 --- package.json | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 90d4d87a..3c287a78 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,6 @@ "description": "High-performance network visualization library, rendering to WebGL as well as other targets", "source": "src/index.umd.ts", "main": "./index.js", - "exports": "./index.js", "types": "./index.d.ts", "scripts": { "clean": "rm -rf dist && rm -rf .parcel-cache", @@ -32,6 +31,28 @@ "distDir": "./dist/umd" } }, + "exports": { + ".": { + "default": "./index.js", + "types": "./index.d.ts" + }, + "./renderers/*": { + "default": "./renderers/*/index.js", + "types": "./renderers/*/index.d.ts" + }, + "./bindings/react/*": { + "default": "./bindings/react/*.js", + "types": "./bindings/react/*.d.ts" + }, + "./bindings/native/*": { + "default": "./bindings/native/*.js", + "types": "./bindings/native/*.d.ts" + }, + "./layout/*": { + "default": "./layout/*/index.js", + "types": "./layout/*/index.d.ts" + } + }, "author": "James Conkling jameslaneconkling.github.io", "license": "ISC", "dependencies": { @@ -82,14 +103,7 @@ "vite": "^4.4.9", "vitest": "^0.34.4" }, - "keywords": [ - "graph", - "network", - "infovis", - "visualization", - "react", - "webgl" - ], + "keywords": ["graph", "network", "infovis", "visualization", "react", "webgl"], "peerDependencies": { "react": ">=16.0" },