From 25915579ee58ede5952a62fa424ebb1ad5fa7727 Mon Sep 17 00:00:00 2001 From: cain4chain Date: Wed, 4 Dec 2024 18:25:06 +1100 Subject: [PATCH] Fix(spv 1222) tslib issue with vanilla js project #2 (#1112) Co-authored-by: Krzysztof Tomecki <152964795+chris-4chain@users.noreply.github.com> --- package.json | 2 +- rollup.config.ts | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 237e2a0a..373a593c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bsv/spv-wallet-js-client", - "version": "1.0.0-beta.26", + "version": "1.0.0-beta.27", "description": "TypeScript library for connecting to a SPV Wallet server", "repository": { "type": "git", diff --git a/rollup.config.ts b/rollup.config.ts index 7c8f1f28..43685ced 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -33,15 +33,20 @@ const config: RollupOptions[] = [ skip: ['bsv'], browser: true, preferBuiltins: true, - moduleDirectories: ['node_modules'], }), commonjs(), json(), - typescript({ tsconfig: "./tsconfig.json", sourceMap: false }), + typescript({ + tsconfig: "./tsconfig.json", + sourceMap: false, + noEmitHelpers: true, + importHelpers: true + }), nodePolyfills(), externals({ devDeps: true, peerDeps: true, + exclude: ['tslib'] }), ], }, @@ -60,7 +65,12 @@ const config: RollupOptions[] = [ ], external: ['bsv', 'cross-fetch', 'cross-fetch/polyfill'], plugins: [ - typescript({ tsconfig: "./tsconfig.json", sourceMap: false }), + typescript({ + tsconfig: "./tsconfig.json", + sourceMap: false, + noEmitHelpers: true, + importHelpers: true + }), resolve({ // @ts-ignore skip: ['bsv'], @@ -68,6 +78,7 @@ const config: RollupOptions[] = [ externals({ devDeps: true, peerDeps: true, + exclude: ['tslib'] }), ], },