| | |
| | | import uniPlugin from '@dcloudio/vite-plugin-uni'; |
| | | import ViteRestart from 'vite-plugin-restart'; |
| | | import { AutoImportDeps } from './autoImport'; |
| | | import uniPlugin from '@dcloudio/vite-plugin-uni' |
| | | import ViteRestart from 'vite-plugin-restart' |
| | | import { AutoImportDeps } from './autoImport' |
| | | // import { ConfigImageminPlugin } from './imagemin'; |
| | | // import { ReplaceUrlPlugin } from './replaceUrl'; |
| | | import { AutoRegistryComponents } from './component'; |
| | | import { MCPPlugin } from './mcp'; |
| | | import { ConfigUnoCSSPlugin } from './unocss'; |
| | | import { AutoRegistryComponents } from './component' |
| | | import { MCPPlugin } from './mcp' |
| | | import { ConfigUnoCSSPlugin } from './unocss' |
| | | |
| | | export default function createVitePlugins(isBuild) { |
| | | export default function createVitePlugins (isBuild) { |
| | | const vitePlugins = [ |
| | | // UnoCSS配置 |
| | | ConfigUnoCSSPlugin(), |
| | |
| | | }), |
| | | // 为项目开启 MCP Server |
| | | MCPPlugin(), |
| | | ]; |
| | | ] |
| | | |
| | | if (isBuild) { |
| | | const buildPlugins = [ |
| | |
| | | // CleanImagePlugin(), |
| | | // 打包视图分析 |
| | | // VisualizerPlugin(), |
| | | ]; |
| | | vitePlugins.push(...buildPlugins); |
| | | ] |
| | | vitePlugins.push(...buildPlugins) |
| | | } |
| | | |
| | | return vitePlugins; |
| | | return vitePlugins |
| | | } |