mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	feat: 添加预发布打包模式
This commit is contained in:
		
							parent
							
								
									482b41966e
								
							
						
					
					
						commit
						acebbd8958
					
				
							
								
								
									
										14
									
								
								.env.staging
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								.env.staging
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					# 预发布也需要生产环境的行为
 | 
				
			||||||
 | 
					# https://cn.vitejs.dev/guide/env-and-mode.html#modes
 | 
				
			||||||
 | 
					NODE_ENV=production
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					VITE_PUBLIC_PATH = /
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 线上环境路由历史模式
 | 
				
			||||||
 | 
					VITE_ROUTER_HISTORY = "hash"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 线上环境后端地址
 | 
				
			||||||
 | 
					VITE_PROXY_DOMAIN_REAL = ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# 是否为打包后的文件提供传统浏览器兼容性支持 支持 true 不支持 false
 | 
				
			||||||
 | 
					VITE_LEGACY = false
 | 
				
			||||||
@ -6,6 +6,7 @@
 | 
				
			|||||||
    "dev": "cross-env --max_old_space_size=4096 vite",
 | 
					    "dev": "cross-env --max_old_space_size=4096 vite",
 | 
				
			||||||
    "serve": "pnpm dev",
 | 
					    "serve": "pnpm dev",
 | 
				
			||||||
    "build": "rimraf dist && cross-env vite build",
 | 
					    "build": "rimraf dist && cross-env vite build",
 | 
				
			||||||
 | 
					    "build:staging": "rimraf dist && cross-env vite build --mode staging",
 | 
				
			||||||
    "report": "rimraf dist && cross-env vite build",
 | 
					    "report": "rimraf dist && cross-env vite build",
 | 
				
			||||||
    "deploy": "bash deploy.sh",
 | 
					    "deploy": "bash deploy.sh",
 | 
				
			||||||
    "preview": "vite preview",
 | 
					    "preview": "vite preview",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user