OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
2.98k stars 3.12k forks source link

[Bug]safari browser Unable to open,not support static {...} #4246

Open 857128237 opened 1 week ago

857128237 commented 1 week ago

Describe the Bug

safari browser Unable to open https://viewer.ohif.org/

Steps to Reproduce

safari browsers Error unable to open https://viewer.ohif.org/

The current behavior

error info: SyntaxError: Unexpected token '{'

The expected behavior

Normal open https://viewer.ohif.org/ and Normal open Tag<v3.8.2>

OS

macOS 12.0.1

Node version

16.20.2

Browser

Safari 15.1

sedghi commented 1 week ago

it opens for me CleanShot 2024-06-21 at 11 24 33@2x

update safari?

857128237 commented 1 week ago

@sedghi First of all, thank you for your reply。Because this issue has indeed occurred on both my Mac and phone, the issue should be whether the browser supports the writing style of "static {...}", and whether it is possible for Babel to further optimize it 6101719114405_ pic

857128237 commented 1 week ago

And I have tried many people's phones (including iPhone and Android), all of which have black screens, so I think it is a serious problem

857128237 commented 1 week ago

6131719122988_ pic

857128237 commented 1 week ago

I think it's because it didn't take effect: @babel/plugin-transform-class-static-block

857128237 commented 1 week ago

I have also seen other users mention this issue (https://github.com/OHIF/Viewers/issues/3941)

857128237 commented 1 week ago

If ES2015 is added to this place, it may solve this problem:https://github.com/cornerstonejs/cornerstone3D/blob/main/packages/core/tsconfig.esm.json, Add to everything in the package 6161719148263_ pic

857128237 commented 1 week ago

@sedghi I asked https://github.com/cornerstonejs/cornerstone3D The tsconfig.esm.json in the core and tools have both been added with module: 'es2015' and target: 'es2015', and Safari will eventually be able to access them. I hope to synchronize or use other methods, which is very important to me. Thank you again

image
sedghi commented 2 days ago

Hmmm, how old is this safari? I was thinking to even target es2022 ...