| 
									
										
										
										
											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-04-04 14:28:56 +08:00
										 |  |  | import createVueSetupExtend from './vue-setup-extend'; | 
					
						
							| 
									
										
										
										
											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-04-03 00:05:09 +08:00
										 |  |  |   const vitePlusgins: any = []; | 
					
						
							|  |  |  |   vitePlusgins.push(vue()); | 
					
						
							|  |  |  |   vitePlusgins.push(createUnoCss()); | 
					
						
							|  |  |  |   vitePlusgins.push(createAutoImport(path)); | 
					
						
							|  |  |  |   vitePlusgins.push(createComponents(path)); | 
					
						
							|  |  |  |   vitePlusgins.push(createCompression(viteEnv)); | 
					
						
							|  |  |  |   vitePlusgins.push(createIcons()); | 
					
						
							|  |  |  |   vitePlusgins.push(createSvgIconsPlugin(path, isBuild)); | 
					
						
							| 
									
										
										
										
											2023-04-04 14:28:56 +08:00
										 |  |  |   vitePlusgins.push(createVueSetupExtend()); | 
					
						
							| 
									
										
										
										
											2023-04-03 00:05:09 +08:00
										 |  |  |   return vitePlusgins; | 
					
						
							| 
									
										
										
										
											2023-04-02 01:01:56 +08:00
										 |  |  | }; |