From dcf4199607ff7824e4dece6f2721e812bf9c2ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= Date: Fri, 22 Nov 2024 10:12:15 +0100 Subject: [PATCH] Export browser file for module resolution This ensures that depending on the package type, require.resolve("view-transitions-polyfill") import.meta.resolve("view-transitions-polyfill") both return the correct file path. "browser" is not a standard package.json field name. --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d776744..1a6c755 100644 --- a/package.json +++ b/package.json @@ -49,5 +49,8 @@ "files": [ "dist" ], - "browser": "./dist/view-transitions-polyfill.js" + "browser": "./dist/view-transitions-polyfill.js", + "exports": { + ".": "./dist/view-transitions-polyfill.js" + } }