Ideally we don't require any of this config. So we'll have to find a solution to the fact that CashScript and its dependencies require these Node.js specific modules. @mr-zwets mentioned that @mainnet-pat is also familiar with these issues of trying to run CashScript / electrum-cash in the browser, so maybe he'll have some ideas as well.
Right now, this is what a Next.js config file has to look like for CashScript to work with it:
Ideally we don't require any of this config. So we'll have to find a solution to the fact that CashScript and its dependencies require these Node.js specific modules. @mr-zwets mentioned that @mainnet-pat is also familiar with these issues of trying to run CashScript / electrum-cash in the browser, so maybe he'll have some ideas as well.