Change build minification to keep function names for better flamegraph/callstacks #1891
-
When profiling my application Paste component calls (which become a pretty large number of components) component names become anonymous (see pic below) I'm pretty sure if we update the config below we can keep our function names. const result = await Terser.minify(fs.readFileSync(filePath, 'utf8'), { keep_fnames:true }); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @GiantRobots, Thanks for the suggestion! This is tricky; we want to ship the absolute smallest bundle for developers using Paste, but at the same time understand the debugging concern. My ideal approach would be to ship two versions: minified ( |
Beta Was this translation helpful? Give feedback.
Hi @GiantRobots,
Thanks for the suggestion! This is tricky; we want to ship the absolute smallest bundle for developers using Paste, but at the same time understand the debugging concern.
My ideal approach would be to ship two versions: minified (
*.min.js
) and an unminified (*.js
) version of our packages. While I can easily build both versions in our dist folders, I'm not sure yet how developers can toggle between both versions. What do you think?