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.
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 universaldeprecateMethod
function that works both in browser and node.In node it still uses
process.emitWarning
and in browserconsole.warn
.