facebook / memlab

A framework for finding JavaScript memory leaks and analyzing heap snapshots
https://facebook.github.io/memlab/
MIT License
4.35k stars 118 forks source link

how to position qiankun + vue2 leaked code? #50

Closed HHH1994 closed 1 year ago

HHH1994 commented 1 year ago

hello, i used memlab to detect my project which is coded by Vue2 + qiankun, find some leaks.but trace info is almost complied code that variable's name is not similar to origin code . can u give me some help to solve the problem that is too difficult to detected leaked code's position in webapck service? thanks mmexport1667874851257

JacksonGL commented 1 year ago

Hi @HHH1994 To get readable trace, the website under test needs to serve non-minified code (or at least minified code with readable variables, function name, and property names on objects). I remember there is an option in webpack to turn off minification. Something like:

{
    ...
    optimization: {
        minimize: false
    },
}
HHH1994 commented 1 year ago

@JacksonGL thank you bro, expect more example with specific trace detail in the future

JacksonGL commented 1 year ago

Closing this issue for now. Let me know if you have more questions