webpack / tapable

Just a little module for plugins.
MIT License
3.71k stars 393 forks source link

Remove usage of node internal/util to support bundling with webpack 5 with no need of node polyfills #150

Closed barak007 closed 3 years ago

barak007 commented 3 years ago

tapable should be able to work in browser. The usage of nodes internal/util is the only thing that stops it from bundle without any node polyfills.

I notice that the usage of the util.deprecate function is limited to methods, so I created a simple universal deprecateMethod function that works both in browser and node.

In node it still uses process.emitWarning and in browser console.warn.