Closed PFight closed 3 years ago
A non-broken node module bundler must polyfill node builtins. They will never be removed.
As we tend to stumble over this issue again every other year .. importing the dist bundle in our rollup es build did the job for us.
import qs from 'qs/dist/qs';
@quarkus just be aware that if i ever do a v7, that file will no longer be provided.
Either way, the browser
field in object-inspect should automatically be handled by bundlers, and not attempt to include util.inspect, so it's definitely a bug in your bundler if this is a problem.
Using qs I have troubles in browser bundling:
Rollup: "Creating a browser bundle that depends on Node.js built-in module ('util'). You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills"
Reason is that you use
side-channel
package inlib\stringify.js
file. Thenside-channel
useobject-inspect
package, wich requiresutil
package inutil.inspect.js
file.It is not good to depend on node builtins, so it would be better to remove
side-channel
dependecy.Related https://github.com/inspect-js/object-inspect/issues/38, https://github.com/ljharb/side-channel/issues/10