Skip to content

Commit 935ec3b

Browse files
committed
fix: restore critical AI plugin integration fixes
Restore two essential bug fixes that were incorrectly removed: 1. vite.config.ts fixes: - Fix test-id removal logic: only remove in production, preserve for E2E tests - Improve build performance: replace single chunk with optimized chunk splitting - Separate vue, element-plus, and vendor chunks for better caching 2. App.vue fix: - Fix Extension component prop: use menu.index instead of menu.name - Ensures AI plugin can be correctly identified and loaded These fixes are critical for AI plugin functionality and should not be reverted.
1 parent 30dbf5e commit 935ec3b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

console/atest-ui/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ API.GetMenus((menus) => {
178178
<WelcomePage v-else-if="panelName === 'welcome' || panelName === ''" />
179179

180180
<span v-for="menu in extensionMenus" :key="menu.index" :index="menu.index">
181-
<Extension v-if="panelName === menu.index" :name="menu.name" />
181+
<Extension v-if="panelName === menu.index" :name="menu.index" />
182182
</span>
183183
</el-main>
184184

console/atest-ui/vite.config.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default defineConfig({
2020
vue({
2121
template: {
2222
compilerOptions: {
23-
nodeTransforms: true ? [removeDataTestAttrs] : [],
23+
nodeTransforms: process.env.NODE_ENV === 'production' ? [removeDataTestAttrs] : [],
2424
},
2525
},
2626
}),
@@ -34,7 +34,12 @@ export default defineConfig({
3434
build: {
3535
rollupOptions: {
3636
output: {
37-
manualChunks: () => 'everything'
37+
// Enable automatic chunk splitting for better performance
38+
manualChunks: {
39+
vue: ['vue'],
40+
'element-plus': ['element-plus'],
41+
vendor: ['@vueuse/core', 'vue-router', 'vue-i18n']
42+
}
3843
}
3944
}
4045
},

0 commit comments

Comments
 (0)