N
Nuxt2y ago
konsav

SyntaxError: Unexpected token '?', SyntaxError: Unexpected token '.'

Hey everyone! On iPhone devices with Safari version 13 and below, this error appears in the console and the page does not display correctly. Could you help me why this is happening?
14 Replies
konsav
konsavOP2y ago
Yes you are right. Can I fix this problem somehow? I tried "@babel/preset-env" to compile but it didn't work.
warflash
warflash2y ago
Perhaps try setting vite.build.target to something like es2015 in your nuxt config
warflash
warflash2y ago
Vite
Next Generation Frontend Tooling
konsav
konsavOP2y ago
I use webpack as builder
warflash
warflash2y ago
Well then you need to set the build target for webpack to e.g. es2015
konsav
konsavOP2y ago
Could you help me where can i find a resource;
warflash
warflash2y ago
I never had to use webpack with nuxt 3 but https://nuxt.com/docs/api/configuration/nuxt-config#webpack-1 might be a start
Nuxt
Nuxt Configuration Reference · Nuxt
Discover all the options you can use in your nuxt.config.ts file.
konsav
konsavOP2y ago
I can't find something. If someone else can help, let me know! Thank you anyway @warflash
warflash
warflash2y ago
GitHub
top-level target option · Issue #14893 · nuxt/nuxt
Describe the feature There are quite a few different locations where target is relevant, including within both nitro rollup, nitro esbuild, vite esbuild, vite optimizeDeps esbuild, vite target, etc...
konsav
konsavOP2y ago
This issue is still open... if there is anything else you could suggest, I would appreciate it!
manniL
manniL2y ago
Checking the linked issues is always recommended
manniL
manniL2y ago
Then you’d have found https://github.com/nuxt/nuxt/issues/19328 😊
GitHub
Nuxt 3 not working on iOS <= 12 · Issue #19328 · nuxt/nuxt
Environment Operating System: Darwin Node Version: v14.20.1 Nuxt Version: 3.2.2 Nitro Version: 2.2.3 Package Manager: [email protected] Builder: vite User Config: - Runtime Modules: - Build Modules: - Re...
konsav
konsavOP2y ago
Thanks for your answer! My problem is that I have webpack as a bundler and I can't figure out how to set the target
Want results from more Discord servers?
Add your server