import path from 'path'; import type { NextConfig } from 'next'; const nextConfig: NextConfig = { output: 'standalone', turbopack: { // Keep Turbopack pinned to the monorepo root so dev HMR // does not mis-detect `apps/web` as a standalone project. root: path.resolve(__dirname, '../..'), }, webpack(config) { // Enable WebAssembly for tiny-secp256k1 (used by ecpair/bitcoinjs-lib) config.experiments = { ...config.experiments, asyncWebAssembly: true, }; // Prevent webpack from changing the output of WASM imports config.module.rules.push({ test: /\.wasm$/, type: 'webassembly/async', }); return config; }, }; export default nextConfig;