fix(mini-user): dedupe Taro reactMeta so H5 useDidShow works
CI / verify (pull_request) Has been cancelled

Vite was bundling plugin-framework-react runtime twice, so tab pages crashed with useContext is not a function on enter/switch.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-15 19:33:51 +08:00
parent 7062aeb8f8
commit 5a2e8dfcf8
3 changed files with 108 additions and 2 deletions
+4
View File
@@ -1,8 +1,12 @@
import './lib/text-encoding-polyfill';
import { PropsWithChildren } from 'react';
import WechatShareBootstrap from './components/WechatShareBootstrap';
import { patchTaroH5Hooks } from './lib/patch-taro-h5-hooks';
import './app.css';
// H5:在首屏 page hooks 执行前,把 Taro.useDidShow 等绑到与 createReactApp 同一份 runtime
patchTaroH5Hooks();
function App({ children }: PropsWithChildren) {
return (
<>