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

ice3使用i18n插件后,每次重新在pages里添加路由或删除路由,插件设置的路由都会失效

Ylg12345 opened this issue · comments

commented

Describe the bug

删除pages里的文件后,编译失败,插件设置的路由失效
image

Expected behavior

在pages里添加文件,不会使设置的路由失效
image

Actual behavior

使用i18n,在pages里添加或删除文件,插件设置的路由失效

Version of ice.js

ice3

Content of build.json or ice.config.mts

import { defineConfig } from '@ice/app';
import antd from '@ice/plugin-antd';
import request from '@ice/plugin-request';
import store from '@ice/plugin-store';
import i18n from '@ice/plugin-i18n';

// The project config, see https://v3.ice.work/docs/guide/basic/config
const minify = process.env.NODE_ENV === 'production' ? 'swc' : false;
export default defineConfig(() => ({
  // Set your configs here.
  minify,
  server: {
    onDemand: true,
    format: 'esm',
  },
  plugins: [
    request(),
    store(),
    antd({
      importStyle: true,
    }),
    i18n({
      locales: ['zh-CN', 'en-US', 'de'],
      defaultLocale: 'zh-CN',
    }),
  ],
  routes: {
    ignoreFiles: ['**/components/**']
  }
}));

Additional context

No response