#MacOS 10.14.6 - Webkit 607.3.9 - Can't Upgrade

27 messages · Page 1 of 1 (latest)

high hornet
#

I have Webkit version 607.3.9 on my 2017 MacBook Air Mojave (10.14.6). I got the version number from the plist as described: https://tauri.app/v1/references/webview-versions#macos--ios

But MacOS version 10.13 is supported since it's the default minimum system version: https://tauri.app/v1/api/config/#macconfig.minimumsystemversion

My goal is to simply show a file picker dialog: https://tauri.app/v1/api/js/dialog#open
But I get errors that ? is not a valid character, likely because of the nullish operation that's not supported in my version thing?.something

Does anyone know how I can upgrade my webkit without upgrading the OS? According to the list, my version isn't listed for some reason... am I in a strange place somehow?

Maybe there's something I can tell Vite to do?: https://vitejs.dev/guide/build.html#browser-compatibility

#

I downgraded to 1.2.3 for CLI and 1.2.0 for API and it worked. It wasn't clear that this was a breaking change in the API for this version of webkit. I think maybe at this point the minimum required webkit needs to be updated?

[Update: Dialog works, but FS does not, see comments below]

high hornet
#

(Optional Chaining).
Also it seems that the fs portion of the 1.2.0 version has an Optional Chaining operation and isn't supported on these earlier versions of Webkit

rotund pelican
#

@high hornet when do you see the error?

high hornet
#

There's no error in Safari proper because it's not old enough (14)

#

The webkit version is older for some reason

#

running it with yarn tauri dev

rotund pelican
#

?? was added in ES2020, so it's strange now that I've specified ES2015 in every single option that should be relevant as well as explicitly telling it to transpile dependencies that none of it seems to affect the generated javascript 🤔

#

Whoops, added it to the wrong part, it's 6:00 here and I've been up all night, I blame that 😂
Try adding optimizeDeps: { include: ['@tauri-apps/api'], force: true, disabled: false }, to vite.config.ts

#

It'll instruct Vite to transpile the Tauri API

brisk thistle
#

Does anyone know how I can upgrade my webkit without upgrading the OS?
Not possible.

high hornet
high hornet
#

Didn't seem to work, but I now know where to investigate... "vite do your build stuff on dependencies"
After this update it seemed to chunk up those but still kept the ?? in the chunks

rotund pelican
#

Huh, that's odd. Try fiddling with tsconfig, I dont think I did anything special in it, but I know I got it to not output ??

high hornet
rotund pelican
#

I wonder if adding more stuff to the include would solve it 🤔 The weird thing is that the option does what it should, it just doesn't seem to apply to the chunks, as you said. Some googling makes me believe this is simply a limitation in Vite https://github.com/vitejs/vite/issues/12505

#

I would recommend you head on over to the Vite discord server and ask there

high hornet
#

Yeah thanks

high hornet
#

Last update and not sure where or who should be notified, I've narrowed down the issue to simply Vite v4. I haven't yet had a chance to go to their docs to see if they had a breaking change and no longer support older Safari.

Everything else the same, vite v3.2.7 works exactly as I need it to but anything 4.x will not transpile the dependencies properly.

https://github.com/Kikketer/gametable2/blob/main/package.json#L37

brisk thistle
#

iirc vite 4 indeed increased the minimum safari version to 14

high hornet
#

heh i just read that too 🙂
"The modern browser build now targets safari14 by default for wider ES2020 compatibility (#9063). This means that modern builds can now use BigInt and that the nullish coallessing operator isn't transpiled anymore. If you need to support older browsers, you can add @vitejs/plugin-legacy as usual."

#

i might venture down the path of trying the plugin-legacy

#

Just kind of lost the ambition now, its always the "configuration" stage that kills