From Webpack v5 node modules are no longer available in the browser. It looks like the only node polyfill required is for process for accessing process.env.
At the moment we're making that available in juju-dashboard here: https://github.com/canonical/jaas-dashboard/blob/main/src/index.js#L35.
This lib will need to built with babel/webpack (which might also mean that the tests need to be updated to use Jest). You can see how I did this for bakeryjs here: juju/bakeryjs#39.
From Webpack v5 node modules are no longer available in the browser. It looks like the only node polyfill required is for
processfor accessingprocess.env.At the moment we're making that available in juju-dashboard here: https://github.com/canonical/jaas-dashboard/blob/main/src/index.js#L35.
This lib will need to built with babel/webpack (which might also mean that the tests need to be updated to use Jest). You can see how I did this for bakeryjs here: juju/bakeryjs#39.