| 
									
										
										
										
											2023-04-02 01:01:56 +08:00
										 |  |  | import vue from '@vitejs/plugin-vue'; | 
					
						
							|  |  |  | import createUnoCss from './unocss'; | 
					
						
							|  |  |  | import createAutoImport from './auto-import'; | 
					
						
							|  |  |  | import createComponents from './components'; | 
					
						
							|  |  |  | import createIcons from './icons'; | 
					
						
							|  |  |  | import createSvgIconsPlugin from './svg-icon'; | 
					
						
							| 
									
										
										
										
											2023-04-02 15:07:14 +08:00
										 |  |  | import createCompression from './compression'; | 
					
						
							| 
									
										
										
										
											2023-09-01 11:38:13 +08:00
										 |  |  | import createSetupExtend from './setup-extend'; | 
					
						
							| 
									
										
										
										
											2024-01-11 14:27:46 +08:00
										 |  |  | import createI18n from './i18n'; | 
					
						
							| 
									
										
										
										
											2023-04-02 01:01:56 +08:00
										 |  |  | import path from 'path'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-04-02 23:33:28 +08:00
										 |  |  | export default (viteEnv: any, isBuild = false): [] => { | 
					
						
							| 
									
										
										
										
											2023-12-14 08:17:12 +00:00
										 |  |  |   const vitePlugins: any = []; | 
					
						
							|  |  |  |   vitePlugins.push(vue()); | 
					
						
							|  |  |  |   vitePlugins.push(createUnoCss()); | 
					
						
							|  |  |  |   vitePlugins.push(createAutoImport(path)); | 
					
						
							|  |  |  |   vitePlugins.push(createComponents(path)); | 
					
						
							|  |  |  |   vitePlugins.push(createCompression(viteEnv)); | 
					
						
							|  |  |  |   vitePlugins.push(createIcons()); | 
					
						
							|  |  |  |   vitePlugins.push(createSvgIconsPlugin(path, isBuild)); | 
					
						
							|  |  |  |   vitePlugins.push(createSetupExtend()); | 
					
						
							| 
									
										
										
										
											2024-01-11 14:27:46 +08:00
										 |  |  |   vitePlugins.push(createI18n(path)); | 
					
						
							| 
									
										
										
										
											2023-12-14 08:17:12 +00:00
										 |  |  |   return vitePlugins; | 
					
						
							| 
									
										
										
										
											2023-04-02 01:01:56 +08:00
										 |  |  | }; |