From 5796291c202787ce189c1f0dbc61977b0073172f Mon Sep 17 00:00:00 2001 From: Marek Dorda Date: Thu, 16 Jan 2025 15:01:03 +0100 Subject: [PATCH] fix: Fix require(ESM) for Node v22 Fixes for Node 22: https://github.com/sindresorhus/file-type/issues/696 https://github.com/sindresorhus/file-type/issues/671 https://github.com/sindresorhus/file-type/issues/668 https://github.com/sindresorhus/file-type/issues/661 https://github.com/sindresorhus/file-type/issues/600 ... and others --- package.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 1f5a3cb5..c3d2f57c 100644 --- a/package.json +++ b/package.json @@ -15,16 +15,19 @@ ".": { "node": { "types": "./index.d.ts", - "import": "./index.js" + "import": "./index.js", + "default": "./index.js" }, "default": { "types": "./core.d.ts", - "import": "./core.js" + "import": "./core.js", + "default": "./core.js" } }, "./core": { "types": "./core.d.ts", - "import": "./core.js" + "import": "./core.js", + "default": "./core.js" } }, "sideEffects": false,