From e0e9477e5a5357d2c1ed1ea19f998bc2f38dbc2b Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Sat, 1 Jun 2019 20:11:20 +0200 Subject: [PATCH 1/3] Change 'module' to 'main' --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33ba4ad1..479490bf 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ ], "author": "MyCrypto", "license": "MIT", - "module": "dist/index.js", + "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist" From 760adcae2a46f8c688a4efe86654e27ebf7fa973 Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Sat, 1 Jun 2019 20:18:33 +0200 Subject: [PATCH 2/3] Fix Rollup config --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index a28bdf4b..876c77f6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -17,7 +17,7 @@ const external = [ export default { input: 'src/index.ts', - output: { file: pkg.module, format: 'es', sourcemap: true }, + output: { file: pkg.main, format: 'es', sourcemap: true }, // exclude all node modules external, From fb1780d1c97d294150810fb58ac38090ad14ef98 Mon Sep 17 00:00:00 2001 From: Nick McCurdy Date: Mon, 3 Jun 2019 10:14:36 -0400 Subject: [PATCH 3/3] Use both main and module for build tool support --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 479490bf..4aa82bf8 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "author": "MyCrypto", "license": "MIT", "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist"