V2EX POST
645 subscribers
138 photos
31 videos
99 files
103K links
v2ex新贴定时推送,可按需置顶本频道然后关闭通知
Download Telegram
求助, safari 上运行报错的前端问题

先说问题,在 chrome 、firefox 上完美运行,但在 safari 上运行报错:SyntaxError: Unexpected token '='. Expected an opening '(' before a method's parameter list.

safari 版本:13.x


```ts
# src/utils/helper.ts

export default new class Helpers {
public list: string[] = []; // 主要是这行导致的
}
```


```bash
npm create vite@latest safari-demo --template vue-ts
cd safari-demo
npm install
npm run dev
```

是什么原因导致的啊?是需要安装什么插件吗?有遇到相同问题的吗?

#safari #ts #npm #list #demo #报错 #插件 #chrome #firefox #SyntaxError