warpdesign / webpack-production-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack-production-test

webpack appears to be very agressive when running in production mode. For example, the line dummy.stack; will be stripped in this the production build of this code:

function addStack(obj) {
    obj.stack = "hey!";
}
let dummy = {};
addStack(dummy);
console.log('before');
dummy.stack;
console.log('after');

This can be a problem for code being triggered by property access (like custom Error.prepareStackTrace, see V8 Stacks).

The bindings package does this for example.

About


Languages

Language:JavaScript 100.0%