收藏
回答

自动预览时报错,Error: 非法的文件,错误信息:invalid file,如何解决?

发现编译时报错,具体的代码片段是以下

function isDraftable(value) {
  if (!value)
    return false;
  return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!value.constructor?.[DRAFTABLE] || isMap(value) || isSet(value);
}


其中!!value.constructor?.[DRAFTABLE]使用了es6的 ? 语法,但本地设置已开启JS编译转ES5

最后一次编辑于  2023-09-07
回答关注问题邀请回答
收藏

2 个回答

  • 工号 9527
    工号 9527
    2023-09-07

    你这个文件有多大?

    2023-09-07
    有用
    回复 2
    • lin.t
      lin.t
      2023-09-08
      913 KB
      2023-09-08
      回复
    • lin.t
      lin.t
      2023-09-11
      升级到1.06版本可正常预览
      2023-09-11
      回复
  • 李擘
    李擘
    03-05

    message:预览 Error: 非法的文件,错误信息:invalid file: webgl.wasm.framework.unityweb.js, 3:0, SyntaxError: Unexpected token varvar tuanjieFramework = (() => { [20240305 13:35:23][wx5825503858a89be4]

    appid: wx5825503858a89be4

    openid: o6zAJswBr5w_sGldkOJ1ZEWCGfwo

    ideVersion: 1.06.2403042

    osType: win32-x64

    time: 2024-03-05 13:35:25

    03-05
    有用
    回复
登录 后发表内容