From 5984d6586a54486681c8767692f1a7581a392fdf Mon Sep 17 00:00:00 2001 From: Maiko Tan Date: Thu, 1 Aug 2024 10:01:39 +0800 Subject: [PATCH] chore: update package.json exports for newer nodejs resolution --- package.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/package.json b/package.json index a8b6e8d..0060b4c 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,22 @@ "name": "wiki-saikou", "version": "3.3.1", "description": "The library provides the out of box accessing to MediaWiki API in both browsers & Node.js, and the syntax is very similar to vanilla `new mw.Api()`. TypeScript definition included~", + "type": "commonjs", "main": "./lib/index.js", "types": "./lib/index.d.ts", "browser": "./dist/index.umd.js", "module": "./dist/index.mjs", + "exports": { + ".": { + "types": { + "import": "./lib/index.d.ts", + "require": "./lib/index.d.ts" + }, + "import": "./dist/index.mjs", + "require": "./lib/index.js", + "browser": "./dist/index.umd.js" + } + }, "files": [ "dist", "lib"