mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	fix: vite build
This commit is contained in:
		
							parent
							
								
									12879f9553
								
							
						
					
					
						commit
						1758711174
					
				@ -39,6 +39,23 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
 | 
				
			|||||||
    resolve: {
 | 
					    resolve: {
 | 
				
			||||||
      alias
 | 
					      alias
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    css: {
 | 
				
			||||||
 | 
					      // https://github.com/vitejs/vite/issues/5833
 | 
				
			||||||
 | 
					      postcss: {
 | 
				
			||||||
 | 
					        plugins: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            postcssPlugin: "internal:charset-removal",
 | 
				
			||||||
 | 
					            AtRule: {
 | 
				
			||||||
 | 
					              charset: atRule => {
 | 
				
			||||||
 | 
					                if (atRule.name === "charset") {
 | 
				
			||||||
 | 
					                  atRule.remove();
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    // 服务端渲染
 | 
					    // 服务端渲染
 | 
				
			||||||
    server: {
 | 
					    server: {
 | 
				
			||||||
      // 是否开启 https
 | 
					      // 是否开启 https
 | 
				
			||||||
@ -160,8 +177,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
 | 
				
			|||||||
      sourcemap: false,
 | 
					      sourcemap: false,
 | 
				
			||||||
      brotliSize: false,
 | 
					      brotliSize: false,
 | 
				
			||||||
      // 消除打包大小超过500kb警告
 | 
					      // 消除打包大小超过500kb警告
 | 
				
			||||||
      chunkSizeWarningLimit: 2000,
 | 
					      chunkSizeWarningLimit: 2000
 | 
				
			||||||
      minify: false
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    define: {
 | 
					    define: {
 | 
				
			||||||
      __INTLIFY_PROD_DEVTOOLS__: false
 | 
					      __INTLIFY_PROD_DEVTOOLS__: false
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user