diff --git a/next.config.js b/next.config.js index a843cbe..5066e9b 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,14 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, -} +const withTM = require('next-transpile-modules')(['@multiversx/sdk-dapp']); -module.exports = nextConfig +module.exports = withTM({ + webpack: (config, { isServer }) => { + if (!isServer) { + config.resolve.fallback = { + fs: false, + module: false, + }; + } + + return config; + }, +}); diff --git a/package.json b/package.json index a1883f1..effbce1 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "fs": "^0.0.1-security", "next": "13.5.4", "next-auth": "^4.23.2", + "next-transpile-modules": "^10.0.1", "react": "^18", "react-dom": "^18" },