Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ice3.0 国际化 useLocale() 报index.tsx:26 Uncaught TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator)) #6956

Open
dengying918 opened this issue Jul 26, 2024 · 3 comments
Labels

Comments

@dengying918
Copy link

Describe the bug

const [activeLocale, setLocale] = useLocale();
index.tsx:26 Uncau
企业微信截图_17219576082253
企业微信截图_17219576177460
ght TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))

Expected behavior

能正常使用国际化

Actual behavior

No response

Version of ice.js

3.0

Content of build.json or ice.config.mts

export default defineConfig(() => {
  return {
    ssg: false,
    codeSplitting: false,
    minify,
    outputDir: "dist",
    routes: {
      ignoreFiles: [
        "**/components/**", // 忽略被解析成路由组件
      ],
    },
    plugins: [
      i18n({
        locales: ["zh-CN", "en-US"],
        defaultLocale: "zh-CN",
        autoRedirect: true,
      }),
  };
});

Additional context

No response

@ClarkXia
Copy link
Collaborator

能否用 with-i18n 提供一个复现 demo,方便判断是插件内部逻辑原因还是其他三方依赖导致

@dengying918
Copy link
Author

能否用 with-i18n 提供一个复现 demo,方便判断是插件内部逻辑原因还是其他三方依赖导致

怎么传demo

@ClarkXia
Copy link
Collaborator

提供一个 github 链接,或者上传 zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants