diff --git a/packages/runtime-kit/src/dataLoader.ts b/packages/runtime-kit/src/dataLoader.ts index bd9c7014c4..84c5ac3a37 100644 --- a/packages/runtime-kit/src/dataLoader.ts +++ b/packages/runtime-kit/src/dataLoader.ts @@ -58,7 +58,10 @@ export function setFetcher(customFetcher: RunClientAppOptions['dataLoaderFetcher /** * Custom decorator for deal with data loader. */ -let dataLoaderDecorator: RunClientAppOptions['dataLoaderDecorator']; +// @ts-ignore +let dataLoaderDecorator: RunClientAppOptions['dataLoaderDecorator'] = (dataLoader) => { + return dataLoader; +}; export function setDecorator(customDecorator: RunClientAppOptions['dataLoaderDecorator']): void { dataLoaderDecorator = customDecorator; } diff --git a/packages/runtime/tests/appConfig.test.ts b/packages/runtime/tests/appConfig.test.ts index bc3c9daee3..3c664467f6 100644 --- a/packages/runtime/tests/appConfig.test.ts +++ b/packages/runtime/tests/appConfig.test.ts @@ -1,5 +1,5 @@ import { expect, it, describe } from 'vitest'; -import getAppConfig, { defineAppConfig } from '../src/appConfig.js'; +import { getAppConfig, defineAppConfig } from '@ice/runtime-kit'; describe('AppConfig', () => { it('getAppConfig', () => { diff --git a/packages/runtime/tests/routes.test.tsx b/packages/runtime/tests/routes.test.tsx index 066360c16a..9c9c02f17e 100644 --- a/packages/runtime/tests/routes.test.tsx +++ b/packages/runtime/tests/routes.test.tsx @@ -155,6 +155,7 @@ describe('routes', () => { }); it('load async route', async () => { + process.env.ICE_CORE_ROUTER = 'true'; const { data: deferredResult } = await createRouteLoader({ routeId: 'home', module: InfoItem, diff --git a/packages/runtime/tests/templateParse.test.ts b/packages/runtime/tests/templateParse.test.ts index 84a4847301..b1f4d9300c 100644 --- a/packages/runtime/tests/templateParse.test.ts +++ b/packages/runtime/tests/templateParse.test.ts @@ -3,7 +3,7 @@ */ import { expect, it, describe, beforeEach, afterEach, vi } from 'vitest'; -import { parseTemplate } from '../src/dataLoader'; +import { parseTemplate } from '@ice/runtime-kit'; describe('parseTemplate', () => { let locationSpy; @@ -128,4 +128,4 @@ describe('parseTemplate', () => { ext_headers: {}, }); }); -}); \ No newline at end of file +});