Business scene
When I finished developing a Vue3 project, packaged it and ran it, I found that the browser reported an error:
it means memory leak
How to troubleshoot the source of the problem
For the error report after packaging, it is impossible to find the error report directly. You need to add a sourcemap:true attribute in the vite.config.ts file,
and then click on the error report, so that you can jump to the error report.
And here I appear The memory leak can be seen in the figure below. Due to the logic causing an infinite loop, after handling the logic here, it will run normally in the end.