alibaba / ice

🚀 ice.js: The Progressive App Framework Based On React(基于 React 的渐进式应用框架)

Home Page:https://ice.work

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

权限管理中NoAuthFallback报错

yymelo opened this issue · comments

Describe the bug

export const authConfig = defineAuthConfig(async appData => {
  const { currentUser = {} } = appData

  if (!currentUser?.enabled) {
    history?.push('/');
  }

  return {
    initialAuth: {
      user: currentUser?.id ? true : false,
    },
    NoAuthFallback: (routeConfig) => {
      console.log('routeConfig ', routeConfig);
      return (
        <div>123</div>
      )
    },
  }
})
2f6d510927ae160998a7c8ca6ba93d4

上述代码中

123
部分标红报错

Expected behavior

期望与官方文档描述一致https://v3.ice.work/docs/guide/advanced/auth#%E8%87%AA%E5%AE%9A%E4%B9%89%E6%9D%83%E9%99%90%E7%BB%84%E4%BB%B6

Actual behavior

代码报错无法编译

Version of ice.js

3.3.0

Content of build.json or ice.config.mts

No response

Additional context

No response

提供下具体编译错误信息

提供下具体编译错误信息

7423b42b7da5f80eeeb965e28d406f3

就是上图那样的问题,写html标签就报错了

脑子不清醒,官方文档给的是tsx,工程里起来的是ts。。。。没注意,犯傻了