From e9c1671e805255261374b84146ab1dc0f6033c4e Mon Sep 17 00:00:00 2001 From: Matthias Seemann <296476+semmel@users.noreply.github.com> Date: Wed, 17 Aug 2022 19:45:44 +0200 Subject: [PATCH] Update paths to JS file in package.json (#158) Since the published module (on npm) ships everything in the `dist` folder, the relevant entries in `package.json` should point into that folder. Otherwise Node's resolve algorithm will fail to import the ES modules. E.g. I use rollup with `@rollup/plugin-node-resolve` for bundling. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f2be2e9..296676b 100644 --- a/package.json +++ b/package.json @@ -16,8 +16,8 @@ "cookie esm" ], "type": "module", - "module": "index.js", - "types": "index.d.ts", + "module": "./dist/index.js", + "types": "./dist/index.d.ts", "repository": "markcellus/cookie-store", "devDependencies": { "@types/chai": "^4.2.14",