Steps to reproduce:
-Build pwa locally
-deploy( my case under IIS)
-Perform any measurement( length)
Expected behavior: added measurement to Measurements table
Actual behavior : nothing added
We've recently undergone a large refactor that has introduced a few small issues. This appears to be one of them. Changes that could have impacted this:
cornerstone-tools many feature versionsreact-cornerstone-viewport changesAs we look into this, it's worth considering other outstanding tickets around tool issues, as they're likely related.
I tried to reproduce with latest code locally but was unable to reproduce the issue using dev build.
After talking with @dannyrb, following the production build locally we were able to reproduce the issue.
As it seems to be a build issue, Danny will take care.

@galelis, I'm honestly not sure what's up. I'm seeing different behavior when running the dev-server and the production build. I've tried to reduce the config differences down to nothing, and I still see the discrepancy.
Looking a little closer at the code, and I see how there are a few places some timing issues could creep in, or how v3 tools could "break" measurements under the right conditions. I think we should take a closer look, add some logging, and see if we can refactor/clean the code and resolve the issue in the progress.
I'll outline some more specifics tomorrow. If you wrote this originally, I may pick your brain on why things were done this way so I don't break anything important -- I'm not 100% confidant I know all of the business cases here.
Update:
Turning off the minimizer resolved the issue 馃
Updates:
import './configuration'I have a fix in a PR (https://github.com/OHIF/Viewers/pull/859)
I want to check if we don't have any other issue related with this tree shaking issue.
Thanks for finding the culprit, for the curious here's a small write-up on the _why_:
WebPack adds special comments when it bundles your code. It tries to mark all of the bits of code it thinks are unused. The minifier will "prune" or delete them.
Because we imported something that wasn't a module, it looks like WebPack assumed the file was either empty, or had no way to verify that the methods that were imported were called. So it was erroneously marked.
But any JS we're importing should be exported using ES6 modules (to avoid this)
@galelis, I incorporated the changes into this larger PR: https://github.com/OHIF/Viewers/pull/842
Thanks again -- this was a tricky issue to track down.
Awesome @dannyrb
I added the issue in the PR description. So we can close this issue once PR is merged.
Thanks for the support.