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使用i18n插件后,每次重新在pages里添加路由或删除路由,插件设置的路由都会失效 #6709

Open
Ylg12345 opened this issue Dec 22, 2023 · 0 comments
Assignees
Labels

Comments

@Ylg12345
Copy link

Ylg12345 commented Dec 22, 2023

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

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