From 7a850b784df3c342a10289e2c8da564d1297fbf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Thu, 5 Aug 2021 13:04:20 +0100 Subject: [PATCH] fix: make native ESM importing from Node.js work --- package.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package.json b/package.json index 8414654..4974cb0 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,15 @@ "main": "lib/index.js", "module": "es/index.js", "typings": "es/index.d.ts", + "exports": { + ".": { + "require": "./lib/index.js", + "default": "./es/index.js" + }, + "./es/*": "./es/*.js", + "./lib/*": "./lib/*.js", + "./package.json": "./package.json" + }, "files": [ "lib", "es"