From 9f741a58263e5e377d942d874f0197817371f0c8 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Fri, 8 Jul 2022 15:56:37 -0700 Subject: [PATCH] Add "exports" so pure ESM can `import 'elastic-apm-node/start'` without. This is experimental. I'm not sure if there are side-effects. See https://github.com/elastic/apm-agent-nodejs/issues/1967#issuecomment-1179364683 --- package.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package.json b/package.json index 45e2b61dd6..34722d4f01 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,10 @@ "description": "The official Elastic APM agent for Node.js", "main": "index.js", "types": "index.d.ts", + "exports": { + ".": "./index.js", + "./start": "./start.js" + }, "scripts": { "backport": "backport", "docs:open": "PREVIEW=1 npm run docs:build",