From b40289f8a4a38019e81b9707d98dcaba39558f8d Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Mon, 26 Aug 2024 22:30:31 -0400 Subject: [PATCH] [pkg]: provide export for "browser" We need the built ESM module for the browser for bundlers like vite. This addresses errors like issue #261: > index.mjs?v=73fd6c6e:1 Uncaught SyntaxError: The requested module '/node_modules/eventemitter3/index.js?v=73fd6c6e' does not provide an export named 'default' (at index.mjs?v=73fd6c6e:1:8) --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index eeaf979..0d41123 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "exports": { ".": { "types": "./index.d.ts", + "browser": "./dist/eventemitter3.esm.js", "import": "./index.mjs", "require": "./index.js" },