From c5b1edd709fedfac5ce86946a322866a89757d25 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Fri, 16 Jun 2023 13:08:25 -0700 Subject: [PATCH] Add "exports" field definitions to package.json Fixes https://github.com/google/mediapipe/issues/4547 PiperOrigin-RevId: 540977469 --- mediapipe/tasks/web/package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mediapipe/tasks/web/package.json b/mediapipe/tasks/web/package.json index 4a42018f0..025ab46bd 100644 --- a/mediapipe/tasks/web/package.json +++ b/mediapipe/tasks/web/package.json @@ -5,6 +5,11 @@ "main": "__NAME___bundle.cjs", "browser": "__NAME___bundle.mjs", "module": "__NAME___bundle.mjs", + "exports": { + "import": "./__NAME___bundle.mjs", + "require": "./__NAME___bundle.cjs", + "default": "./__NAME___bundle.mjs" + }, "author": "mediapipe@google.com", "license": "Apache-2.0", "type": "module",