Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWangJustToDo committed May 10, 2024
1 parent 096461a commit 4b74317
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 359 deletions.
8 changes: 5 additions & 3 deletions packages/myreact-dom/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {

import { render, hydrate, hydrateRoot, createRoot } from "./mount";
import { initGlobalRenderPlatform } from "./renderPlatform";
import { findDOMNode, createPortal, unmountComponentAtNode, /* initGlobalHMR */ } from "./tools";
import { findDOMNode, createPortal, unmountComponentAtNode /* initGlobalHMR */ } from "./tools";

import type { ClientDomDispatch, ClientDomDispatchDev } from "./renderDispatch";

Expand All @@ -27,6 +27,8 @@ const flushSync = safeCallWithSync;

const unstable_batchedUpdates = safeCall;

const noop = () => {};

initGlobalRenderPlatform();

// not need for new refresh runtime package
Expand All @@ -47,8 +49,8 @@ const __my_react_dom_shared__ = {
};

const __my_react_dom_internal__ = {
legacyNoopRender,
latestNoopRender,
legacyNoopRender: __DEV__ ? legacyNoopRender : noop,
latestNoopRender: __DEV__ ? latestNoopRender : noop,
};

export {
Expand Down
2 changes: 2 additions & 0 deletions packages/myreact-refresh/src/RefreshRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,4 +444,6 @@ if (__DEV__) {
allSignaturesByType,
updatedFamiliesByType,
};
} else {
console.warn('[@my-react/react-refresh] current environment is not in development mode!')
}
Loading

0 comments on commit 4b74317

Please sign in to comment.