【发布时间】:2022-11-29 18:56:27
【问题描述】:
在我的新项目中,我遇到了 Firefox 的问题。首先,我想说在 Opera、Chrome 和 Edge 中它运行良好,但只有在那个浏览器中才会出现意外错误。
我对一些对象使用本地 JSON,然后在 JS 中我使用
// Import JSON Insurance Data
import insurances from './insurances.json' assert {type: 'json'}
然后
insurances.forEach(e => {myCode});
就像我告诉它的那样,它通常可以正常工作,但在控制台的 Firefox 中是这样的错误:
SyntaxError: unexpected token: identifier
浏览器指向这一行:
import insurances from './insurances.json' assert {type: 'json'}
【问题讨论】:
标签: javascript json firefox