Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Q】npm run build-only 一直核心加载中,但是npm run dev是可以的 #29

Open
Caisen1988 opened this issue Aug 28, 2024 · 0 comments

Comments

@Caisen1988
Copy link

描述
npm run build-only 一直核心加载中,但是npm run dev是可以的
思路

/**

  • 判断数据是否被监控
  • */
    function subscribeHandler(mutation: { events: Record<string, any>, storeId: string }, state: StateTree) {
    const rowState = toRaw(state);
    const { events: { target, newValue, oldValue, key }, storeId } = mutation;
    const dataKey = getStoreKey(rowState, target) + (key ? .${key} : '');
    if (dataKey && WatchKeys[storeId]?.find((watchKey: string) => dataKey.indexOf(watchKey) > -1)) {
    stepManagerIns.addStep(storeId, dataKey, newValue, oldValue);
    }
    }
    打印mutation, 在production环境events是undefined
    {storeId: 'playerState', type: 'direct', events: undefined}
    在dev环境, events是有值的
    Mutation: {"storeId":"playerState","type":"direct","events":{"effect":{"active":true,"deps":[{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}],"_dirtyLevel":0,"_trackId":4,"_runnings":0,"_shouldSchedule":false,"_depsLength":66},"target":{"__v_isShallow":false,"dep":{},"__v_isRef":true,"_rawValue":1,"_value":1},"type":"set","key":"value","newValue":1,"oldValue":2}}

我是环境是node18 Linux, npm run build-only打包的,nginx指向dist文件夹
@Cc-Edit @ReeCode @qq61538187 @songbing1990
几位大佬可否帮忙看一下,万分感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant