JavaScript minimization (aka "minification")
JavaScript minimization (aka "minification") issues have been encountered in both the Uniswap v3 front end demo and the Polywrap Hub. For example, in the Polywrap Hub, class names were being erased during optimization and this was fixed by configuring Webpack. We should ensure our JavaScript packages comply with minimization standards/requirements so that minimization works without requiring users to modify Webpack settings.
Can we do some research on:
- reproducing these minifcation errors (branch links w/ repro steps)
- what are some common issues with minification in production are (removing class names for example)
- where in our code are these issue stemming from?
reproducing these minifcation errors (branch links w/ repro steps)
- Go to demos repository & checkout to branch
update-hello-world-to-origin(PR: https://github.com/polywrap/demos/pull/70) - In
ts-vanillaapp, go to thewebpack.config.jsfile and change (in line 5) mode toproduction - Run the app and try to run the invocation - it should fail
where in our code are these issue stemming from?
Based on @Brioline report of the bug, it looks like the Uri class might be a problem regarding minification. My first thought is that it is something with the getters but not sure...

Also, it's worth mentioning that I fixed this with the keep function & class names in minification (https://github.com/polywrap/polyfolio/pull/150/files)