From f3dff59d356e05e9eed2a19550d2fa78970f3476 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 23 Aug 2018 19:50:37 -0700 Subject: [PATCH] Fix up external dependency bundling --- web3.js/package.json | 1 - web3.js/rollup.config.js | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/web3.js/package.json b/web3.js/package.json index ccaf07737..7e9cecd8f 100644 --- a/web3.js/package.json +++ b/web3.js/package.json @@ -21,7 +21,6 @@ }, "main": "lib/index.cjs.js", "module": "lib/index.esm.js", - "browser": "lib/index.iife.js", "scripts": { "clean": "rimraf ./coverage ./lib", "dev": "cross-env NODE_ENV=development rollup -c", diff --git a/web3.js/rollup.config.js b/web3.js/rollup.config.js index b6c8ea838..95d201c54 100644 --- a/web3.js/rollup.config.js +++ b/web3.js/rollup.config.js @@ -13,7 +13,6 @@ function generateConfig(configType) { const config = { input: 'src/index.js', plugins: [ - nodeResolve(), json(), babel({ exclude: '**/node_modules/**', @@ -50,6 +49,9 @@ function generateConfig(configType) { ]; config.plugins.push(builtins()); config.plugins.push(globals()); + config.plugins.push(nodeResolve({ + browser: true, + })); break; case 'node': config.output = [