From 4356c0a5038e25d6c16681e9511f19c93f47a546 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Thu, 5 Sep 2019 18:17:01 -0300 Subject: [PATCH] Add 'module' field to manifest The 'module' field is used by bundlers such as rollup and webpack to determine the entrypoint for a package. Conventionally 'module' is used for the ES6 entrypoint, and 'main' is used for the CommonJS entrypoint. Adding a 'module' field allows importing bowser as an ES6 module directly, rather than using a package-relative path to the ES6 entrypoint (e.g. `bowser/src/bowser`) Closes #353 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 816748e..10a6100 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ } ], "main": "es5.js", + "module": "src/bowser.js", "types": "index.d.ts", "repository": { "type": "git",