Skip to content

Commit

Permalink
Merge pull request #167 from bancorprotocol/fix/package
Browse files Browse the repository at this point in the history
fixed rollup config handling of external deps
  • Loading branch information
zavelevsky authored Sep 20, 2024
2 parents fc7d8f0 + 6101ced commit e09ad0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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 || {}),
],
};

0 comments on commit e09ad0c

Please sign in to comment.