feat: use simpler nitro instead of nestjs to implement mock service
This commit is contained in:
@@ -9,6 +9,29 @@ interface IImportMap {
|
||||
[scope: string]: Record<string, string>;
|
||||
};
|
||||
}
|
||||
interface PrintPluginOptions {
|
||||
/**
|
||||
* 打印的数据
|
||||
*/
|
||||
infoMap?: Record<string, string | undefined>;
|
||||
}
|
||||
|
||||
interface NitroMockPluginOptions {
|
||||
/**
|
||||
* mock server 包名
|
||||
*/
|
||||
mockServerPackage?: string;
|
||||
|
||||
/**
|
||||
* mock 服务端口
|
||||
*/
|
||||
port?: number;
|
||||
|
||||
/**
|
||||
* mock 日志是否打印
|
||||
*/
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* importmap 插件配置
|
||||
@@ -71,6 +94,14 @@ interface ApplicationPluginOptions extends CommonPluginOptions {
|
||||
injectGlobalScss?: boolean;
|
||||
/** 是否注入版权信息 */
|
||||
license?: boolean;
|
||||
/** 是否开启nitro mock */
|
||||
nitroMock?: boolean;
|
||||
/** nitro mock 插件配置 */
|
||||
nitroMockOptions?: NitroMockPluginOptions;
|
||||
/** dev是否开启mock服务 */
|
||||
print?: boolean;
|
||||
/** 打印插件配置 */
|
||||
printInfoMap?: PrintPluginOptions['infoMap'];
|
||||
/** 是否开启pwa */
|
||||
pwa?: boolean;
|
||||
/** pwa 插件配置 */
|
||||
@@ -111,4 +142,6 @@ export type {
|
||||
IImportMap,
|
||||
ImportmapPluginOptions,
|
||||
LibraryPluginOptions,
|
||||
NitroMockPluginOptions,
|
||||
PrintPluginOptions,
|
||||
};
|
||||
|
Reference in New Issue
Block a user