feat(版本): 优化版本列表筛选体验
关键改动: - 抽取版本列表范围树和筛选规则 - 重构版本列表页的范围选择与优先级筛选 - 配置 Next dev 忽略测试编译输出,避免刷新干扰 Co-Authored-By: Codex GPT-5 <codex@openai.com>
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const TEST_OUTPUT_GLOB = '**/.tmp-test/**';
|
||||
|
||||
function toIgnoredList(ignored) {
|
||||
if (!ignored) return [];
|
||||
const entries = Array.isArray(ignored) ? ignored : [ignored];
|
||||
return entries.filter((entry) => typeof entry === 'string' && entry.length > 0);
|
||||
}
|
||||
|
||||
const nextConfig = {
|
||||
transpilePackages: ['@ftb/shared'],
|
||||
webpack(config, { dev }) {
|
||||
if (dev) {
|
||||
const ignored = toIgnoredList(config.watchOptions?.ignored);
|
||||
config.watchOptions = {
|
||||
...config.watchOptions,
|
||||
ignored: ignored.includes(TEST_OUTPUT_GLOB) ? ignored : [...ignored, TEST_OUTPUT_GLOB],
|
||||
};
|
||||
}
|
||||
return config;
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
|
||||
Reference in New Issue
Block a user