feat: 构建类型定义

This commit is contained in:
winixt 2022-03-28 17:07:36 +08:00
parent d6703f4a88
commit a2425b7236
2 changed files with 22 additions and 2 deletions

View File

@ -1,4 +1,3 @@
module.exports = {
copy: ['index.js']
copy: ['index.js'],
};

View File

@ -2,6 +2,7 @@ import { Component, DefineComponent, App } from 'vue';
import { RouteRecordRaw, Router } from 'vue-router';
import { Plugin } from '@fesjs/runtime';
import { PluginRuntimeConfig } from '@@/runtime';
import { PluginBuildConfig } from '@@/build';
// @ts-ignore
export * from '@@/core/coreExports';
@ -43,3 +44,23 @@ interface InnerRuntimeConfig {
export function defineRuntimeConfig(config: InnerRuntimeConfig & PluginRuntimeConfig): InnerRuntimeConfig & PluginRuntimeConfig;
interface InnerBuildConfig {
base: string;
dynamicImport: boolean;
mock: boolean | {
prefix: string;
};
mountElementId: string;
plugins: string[];
proxy: {
[apiPrefix: string]: {
target: string;
changeOrigin?: boolean;
}
};
singular: boolean;
}
export function defineBuildConfig(config: InnerBuildConfig & PluginBuildConfig ): InnerBuildConfig & PluginBuildConfig;