feat(player): 注册账号、登录双模式与移动端性能优化
注册必填 7-32 位账号,手机号区号/本地号分存;登录默认账号模式并支持切换手机号登录;Player i18n 拆包与赛事接口优化。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,27 @@ import { resolve } from 'path';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (!id.includes('node_modules')) {
|
||||
if (id.includes('/src/i18n/zh-CN')) return 'i18n-zh-CN';
|
||||
if (id.includes('/src/i18n/en-US')) return 'i18n-en-US';
|
||||
if (id.includes('/src/i18n/ms-MY')) return 'i18n-ms-MY';
|
||||
return undefined;
|
||||
}
|
||||
if (id.includes('vue') || id.includes('pinia') || id.includes('vue-router')) {
|
||||
return 'vue-vendor';
|
||||
}
|
||||
if (id.includes('vue-i18n')) return 'i18n-vendor';
|
||||
if (id.includes('axios')) return 'axios';
|
||||
return undefined;
|
||||
},
|
||||
},
|
||||
},
|
||||
chunkSizeWarningLimit: 600,
|
||||
},
|
||||
resolve: {
|
||||
// 避免删除 src 内过期 .js 后仍优先请求 index.js 导致 404
|
||||
extensions: ['.ts', '.tsx', '.mjs', '.js', '.mts', '.jsx', '.json', '.vue'],
|
||||
|
||||
Reference in New Issue
Block a user