From 6101ced01c4b2918e4ddd76e90acdca1c36cd90e Mon Sep 17 00:00:00 2001 From: Doron Zavelevsky Date: Fri, 20 Sep 2024 22:47:08 +0100 Subject: [PATCH] fixed rollup config handling of external deps --- package.json | 2 +- rollup.config.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f8ea47f..d28e87a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@bancor/carbon-sdk", "type": "module", "source": "src/index.ts", - "version": "0.0.99-DEV", + "version": "0.0.101-DEV", "description": "The SDK is a READ-ONLY tool, intended to facilitate working with Carbon contracts. It's a convenient wrapper around our matching algorithm, allowing programs and users get a ready to use transaction data that will allow them to manage strategies and fulfill trades", "main": "dist/index.cjs", "module": "dist/index.js", diff --git a/rollup.config.js b/rollup.config.js index 912fde7..6bc1652 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,6 +2,7 @@ import resolve from '@rollup/plugin-node-resolve'; import commonjs from '@rollup/plugin-commonjs'; import typescript from '@rollup/plugin-typescript'; import { terser } from 'rollup-plugin-terser'; +import pkg from './package.json' assert { type: 'json' }; export default { input: { @@ -34,5 +35,8 @@ export default { typescript(), terser(), // Minifies the bundle ], - external: [], // Add any external dependencies here + external: [ + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.peerDependencies || {}), + ], };