ice icon indicating copy to clipboard operation
ice copied to clipboard

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

Open dengying918 opened this issue 1 year ago • 3 comments

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

dengying918 avatar Jul 26 '24 01:07 dengying918

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

ClarkXia avatar Jul 26 '24 01:07 ClarkXia

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

怎么传demo

dengying918 avatar Jul 26 '24 02:07 dengying918

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

ClarkXia avatar Jul 26 '24 05:07 ClarkXia