feat: 重构代理功能,添加文件代理支持并优化相关逻辑
This commit is contained in:
@@ -17,8 +17,11 @@ type ProxyType = {
|
||||
user: string;
|
||||
key: string;
|
||||
path: string;
|
||||
indexPath: string;
|
||||
absolutePath?: string;
|
||||
type?: 'file';
|
||||
file: {
|
||||
indexPath: string;
|
||||
absolutePath: string;
|
||||
};
|
||||
};
|
||||
export type LocalProxyOpts = {
|
||||
watch?: boolean; // 是否监听文件变化
|
||||
@@ -79,8 +82,10 @@ export class LocalProxy {
|
||||
user: user,
|
||||
key: app,
|
||||
path: `/${user}/${app}/`,
|
||||
indexPath: `${user}/${app}/index.html`,
|
||||
absolutePath: appPath,
|
||||
file: {
|
||||
indexPath: `${user}/${app}/index.html`,
|
||||
absolutePath: appPath,
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user