From fdf5bc25ab75aaec1808cd277302f19cd13caf61 Mon Sep 17 00:00:00 2001 From: DR497 <47689875+dr497@users.noreply.github.com> Date: Sun, 1 Sep 2024 19:22:04 +0800 Subject: [PATCH] js: resolve bundling issues with @solana/buffer-layout and @solana/buffer-layout-utils --- js/rollup.config.mjs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/js/rollup.config.mjs b/js/rollup.config.mjs index 11a04d71..a8764c54 100644 --- a/js/rollup.config.mjs +++ b/js/rollup.config.mjs @@ -43,15 +43,27 @@ export default { preserveModulesRoot: "src", }, ], - external: ["@solana/web3.js"], + external: [ + "@solana/web3.js", + "@solana/buffer-layout-utils", + "@solana/buffer-layout", + ], plugins: [ multiInput.default(), + commonjs(), nodeResolve({ browser: true, preferBuiltins: false, - dedupe: ["borsh", "@solana/spl-token", "bn.js", "buffer"], + dedupe: [ + "borsh", + "@solana/spl-token", + "bn.js", + "buffer", + "@solana/buffer-layout-utils", + "@solana/buffer-layout", + ], }), - commonjs(), + typescript({ tsconfig: "./tsconfig.json", declaration: false,