nextjs-blog-cms-sanity-v3
nextjs-blog-cms-sanity-v3 copied to clipboard
Safari 12 – SyntaxError: Unexpected token '?'
I’m not sure what’s causing this but since the repo switched from app to pages directories, there have been a couple of breaking errors for Safari 12 which stop any interactive elements working e.g. onClick.
In a fresh install with no changes I get the following:
[Error] SyntaxError: Unexpected token '?'
(anonymous function) (117-cca1b89b62e5bb2c.js:61)
Safari Version 12.0 (14606.1.36.1.9)
and in another I get:
[Error] SyntaxError: Unexpected token '.'
eval (main.js:82)
./node_modules/next/dist/compiled/@next/react-dev-overlay/dist/client.js (main.js:82)
factory (webpack.js:713)
__webpack_require__ (webpack.js:37)
Eval Code (hot-dev-client.js:7)
eval
./node_modules/next/dist/client/dev/error-overlay/hot-dev-client.js (main.js:148)
factory (webpack.js:713)
__webpack_require__ (webpack.js:37)
Eval Code (webpack-hot-middleware-client.js:7)
eval
./node_modules/next/dist/client/dev/webpack-hot-middleware-client.js (main.js:192)
factory (webpack.js:713)
__webpack_require__ (webpack.js:37)
Eval Code (next-dev.js:5)
eval
./node_modules/next/dist/client/next-dev.js (main.js:236)
factory (webpack.js:713)
__webpack_require__ (webpack.js:37)
__webpack_exec__ (main.js:1127)
(anonymous function) (main.js:1128)
webpackJsonpCallback (webpack.js:1298)
webpackJsonpCallback
Global Code (main.js:9)
Would be great to get some input on this – Next.js supports Safari 12+ and I would expect the same to be a consideration from any starter deployed by Sanity.
I have the same error on a couple of machines, but would be really helpful to know if the Sanity team are aware of this / have been experiencing themselves.
Thanks so much.