ice
ice copied to clipboard
ice3.0 国际化 useLocale() 报index.tsx:26 Uncaught TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator))
Describe the bug
const [activeLocale, setLocale] = useLocale();
index.tsx:26 Uncau
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
能否用 with-i18n 提供一个复现 demo,方便判断是插件内部逻辑原因还是其他三方依赖导致
提供一个 github 链接,或者上传 zip