score:0

Accepted answer

in case anybody else comes across this issue, i have found a hack which i'm not keen on but it works for now.

i added the following to webpack.config.js

{
  plugins: {
    new webpack.contextreplacementplugin(
      /\/package-name\//,
      (data) => {
        delete data.dependencies[0].critical;
        return data;
      },
    ),
  },
  resolve: {
    fallback: {
      // list of failing modules required only in the api
      "crypto": false,
      "fs": false,
      "http": false,
      "path": false,
      "net": false,
      "querystring": false,
      "stream": false,
      "url": false,
      "util": false,
      "zlib": false
    }
  }
}

Related Query

More Query from same tag