Hi! Please help me with advice, how to investigate...
# javascript
a
Hi! Please help me with advice, how to investigate this issue. I have project with react and everything runs fine on "debug" webpack run. But I have a strange issue on
browserProductionWebpack
. One of the
setState{}
is not executed. Without any errors in console. All code before and after
setState{}
executed fine, but not inside. How to investigate such issues? Legacy compiler
r
Maybe try IR. You could get some more information in the console.
You can also try to change Terser webpack plugin to Uglifyjs and compare the results.
a
@Robert Jaros thx. I will try Uglifyjs. I have successful builds with Terser before. Unfortunately, a lot of changes since latest prod build (compiler, libs, code, wrappers), so I do not understand what trigger this and how to investigate ( I can't make successful build with IR. No build errors, but impossible to create redux store.
Workaround is to move
setState
to separate function. So ugly ( Are any annotations or rule files exist for Terser?