openbook-dex / openbook-v2

openbook-v2 monorepo, contains solana program and ts client
Other
159 stars 89 forks source link

Fix: wallet import for react/nextjs compatible #256

Closed LukasDeco closed 7 months ago

LukasDeco commented 7 months ago

I realize this looks a little wacky, but this was the only way I could get my nextjs app to build. Since this change to the TS client, nextjs will not build with this. You can read other issues. About this. I don't know if someone has a better solution, but this was how I was able to get it to work.

I had already tried this for the next.config:

experimental: {
        serverComponentsExternalPackages: ["@coral-xyz/anchor"],
      },

Sadly this didn't work even though it looked very promising.

LukasDeco commented 7 months ago

@mschneider can you take a look? Thank you.