Closed anyone0034 closed 5 months ago
为什么我在引用defineDataLoader之后,热加载的时间就会增加。如果不引用,平时1s完成热加载,引入之后,就变成7、8s
热加载的时间,能在正常的范围内。
import { defineDataLoader, Await, useData, history } from 'ice';
export const dataLoader = defineDataLoader(async () => { return { nickname: "", }; });
"devDependencies": { "@applint/spec": "^1.2.3", "@ice/app": "^3.3.9", "@ice/plugin-auth": "^1.0.2", "@ice/plugin-request": "^1.0.2", "@ice/plugin-store": "^1.1.2", "@types/babel__core": "^7", "@types/node": "^20.10.6", "@types/react": "^18.2.46", "@types/react-dom": "^18.2.18", "@types/speed-measure-webpack-plugin": "^1", "eslint": "^8.56.0", "stylelint": "^16.1.0", "typescript": "^5.3.3" },
import { defineConfig } from '@ice/app'; import request from '@ice/plugin-request'; import store from '@ice/plugin-store'; import auth from '@ice/plugin-auth'; const minify = process.env.NODE_ENV === 'production' ? 'swc' : false; export default defineConfig(() => ({ compileDependencies: true, htmlGenerating: true, ssg: false, minify, plugins: [ request(), store(), auth(), ], routes: { defineRoutes: (route) => { }, }, }));
No response
能不能提供个复现 demo 供排查
Fixed in #6804
Describe the bug
为什么我在引用defineDataLoader之后,热加载的时间就会增加。如果不引用,平时1s完成热加载,引入之后,就变成7、8s
Expected behavior
热加载的时间,能在正常的范围内。
Actual behavior
import { defineDataLoader, Await, useData, history } from 'ice';
export const dataLoader = defineDataLoader(async () => { return { nickname: "", }; });
Version of ice.js
"devDependencies": { "@applint/spec": "^1.2.3", "@ice/app": "^3.3.9", "@ice/plugin-auth": "^1.0.2", "@ice/plugin-request": "^1.0.2", "@ice/plugin-store": "^1.1.2", "@types/babel__core": "^7", "@types/node": "^20.10.6", "@types/react": "^18.2.46", "@types/react-dom": "^18.2.18", "@types/speed-measure-webpack-plugin": "^1", "eslint": "^8.56.0", "stylelint": "^16.1.0", "typescript": "^5.3.3" },
Content of build.json or ice.config.mts
Additional context
No response