Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for config-free usage in browser (e.g. Next.js) #147

Open
rkalis opened this issue Mar 29, 2023 · 0 comments
Open

Allow for config-free usage in browser (e.g. Next.js) #147

rkalis opened this issue Mar 29, 2023 · 0 comments

Comments

@rkalis
Copy link
Member

rkalis commented Mar 29, 2023

Right now, this is what a Next.js config file has to look like for CashScript to work with it:

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  webpack: (config, options) => {
    config.experiments = {...config.experiments, topLevelAwait: true };
    config.resolve.alias = {...config.resolve.alias, ...{
        net: false,
        tls: false,
        fs: false,
      }};

    return config
  },
}

module.exports = nextConfig

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant