- 新增 scripts/package_metrix.py 打包应用包(user_auth=metrix、admin_auth=none、数据目录 /data) - 托管模式只认平台代理身份,停用应用登录与改密码,新增 /api/session - 后端按 X-Forwarded-Prefix 注入 <base href>,前端改为相对路径构建并按 basePath 请求 - 托管时隐藏登录页、退出按钮和修改密码页,顶栏显示 Metrix 用户名 - 移除授权到期校验、激活码和连点品牌图标打开的授权延期窗口 - 移除 Metrix 平台数据源/仓库模式及相关配置、接口、设置页和 requests 依赖 - 新增托管鉴权与 base href 注入测试,更新使用与开发文档
32 lines
795 B
TypeScript
32 lines
795 B
TypeScript
import { defineConfig } from 'vite';
|
|
import vue from '@vitejs/plugin-vue';
|
|
import AutoImport from 'unplugin-auto-import/vite';
|
|
import Components from 'unplugin-vue-components/vite';
|
|
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers';
|
|
|
|
export default defineConfig({
|
|
// 相对路径资源:托管到 Metrix 时由后端注入 <base href="/apps/<slug>/">。
|
|
base: './',
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
imports: ['vue', 'vue-router'],
|
|
resolvers: [NaiveUiResolver()],
|
|
dts: false
|
|
}),
|
|
Components({
|
|
resolvers: [NaiveUiResolver()],
|
|
dts: false
|
|
})
|
|
],
|
|
server: {
|
|
host: '127.0.0.1',
|
|
port: 5174,
|
|
strictPort: true,
|
|
proxy: {
|
|
'/api': 'http://127.0.0.1:9081',
|
|
'/health': 'http://127.0.0.1:9081'
|
|
}
|
|
}
|
|
});
|