fix: build scripts error
This commit is contained in:
parent
7f4eae3127
commit
a3f7709c90
|
@ -70,6 +70,7 @@
|
|||
"jest": "^25.5.4",
|
||||
"jest-environment-jsdom-sixteen": "^1.0.3",
|
||||
"lint-staged": "^15.2.0",
|
||||
"openinula": "workspace:*",
|
||||
"prettier": "^3.1.1",
|
||||
"rollup": "^2.75.5",
|
||||
"rollup-plugin-execute": "^1.1.1",
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"types": "build/@types/index.d.ts",
|
||||
"scripts": {
|
||||
"demo-serve": "webpack serve --mode=development",
|
||||
"rollup-build": "rollup --config rollup.config.js && npm run build-types",
|
||||
"build": "rollup --config rollup.config.js && npm run build-types",
|
||||
"build-types": "tsc -p tsconfig.json && rollup -c build-type.js",
|
||||
"test": "jest --config jest.config.js",
|
||||
"test-c": "jest --coverage"
|
||||
|
|
|
@ -26,9 +26,7 @@ export const fetchRequest = (config: IrRequestConfig): Promise<IrResponse> => {
|
|||
const {
|
||||
method = 'GET',
|
||||
baseURL,
|
||||
url,
|
||||
params = null,
|
||||
data = null,
|
||||
headers = {},
|
||||
responseType,
|
||||
timeout = 0,
|
||||
|
@ -37,8 +35,8 @@ export const fetchRequest = (config: IrRequestConfig): Promise<IrResponse> => {
|
|||
withCredentials = false,
|
||||
onUploadProgress = null,
|
||||
onDownloadProgress = null,
|
||||
signal,
|
||||
} = config;
|
||||
let { data = null, url, signal } = config;
|
||||
|
||||
const controller = new AbortController();
|
||||
if (!signal) {
|
||||
|
|
|
@ -24,7 +24,6 @@ export const ieFetchRequest = (config: IrRequestConfig): Promise<IrResponse> =>
|
|||
const {
|
||||
method = 'get',
|
||||
baseURL,
|
||||
url,
|
||||
params = null,
|
||||
data = null,
|
||||
headers = {},
|
||||
|
@ -34,7 +33,7 @@ export const ieFetchRequest = (config: IrRequestConfig): Promise<IrResponse> =>
|
|||
cancelToken = null,
|
||||
withCredentials = false,
|
||||
} = config;
|
||||
|
||||
let { url } = config;
|
||||
let controller: any;
|
||||
let signal;
|
||||
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
"declaration": true,
|
||||
"moduleResolution": "node",
|
||||
"sourceMap": true,
|
||||
"downlevelIteration": true
|
||||
"downlevelIteration": true,
|
||||
"paths": {
|
||||
"openinula": ["../packages/inula"],
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*",
|
||||
|
|
|
@ -60,9 +60,7 @@ function newVirtualNode(tag: VNodeTag, key?: null | string, vNodeProps?: any, re
|
|||
return new VNode(tag, vNodeProps, key as null | string, realNode);
|
||||
}
|
||||
|
||||
type FunctionType = typeof Function;
|
||||
|
||||
function isClassComponent(comp: FunctionType) {
|
||||
function isClassComponent(comp: (...arg: any) => any) {
|
||||
// 如果使用 getPrototypeOf 方法获取构造函数,不能兼容业务组组件继承组件的使用方式,会误认为是函数组件
|
||||
// 如果使用静态属性,部分函数高阶组件会将类组件的静态属性复制到自身,导致误判为类组件
|
||||
// 既然已经兼容使用了该标识符,那么继续使用
|
||||
|
@ -77,7 +75,7 @@ export function getLazyVNodeTag(lazyComp: any): string {
|
|||
} else if (lazyComp !== undefined && lazyComp !== null && typeLazyMap[lazyComp.vtype]) {
|
||||
return typeLazyMap[lazyComp.vtype];
|
||||
}
|
||||
throw Error('Inula can\'t resolve the content of lazy');
|
||||
throw Error("Inula can't resolve the content of lazy");
|
||||
}
|
||||
|
||||
// 创建processing
|
||||
|
|
Loading…
Reference in New Issue