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,