Add "exports" field definitions to package.json

Fixes https://github.com/google/mediapipe/issues/4547

PiperOrigin-RevId: 540977469
This commit is contained in:
Sebastian Schmidt 2023-06-16 13:08:25 -07:00 committed by Copybara-Service
parent 6f065bc405
commit c5b1edd709

View File

@ -5,6 +5,11 @@
"main": "__NAME___bundle.cjs", "main": "__NAME___bundle.cjs",
"browser": "__NAME___bundle.mjs", "browser": "__NAME___bundle.mjs",
"module": "__NAME___bundle.mjs", "module": "__NAME___bundle.mjs",
"exports": {
"import": "./__NAME___bundle.mjs",
"require": "./__NAME___bundle.cjs",
"default": "./__NAME___bundle.mjs"
},
"author": "mediapipe@google.com", "author": "mediapipe@google.com",
"license": "Apache-2.0", "license": "Apache-2.0",
"type": "module", "type": "module",