throw new Error('hydrateRoot(...): Target container is not a DOM element.');
^
Error: hydrateRoot(...): Target container is not a DOM element.
at hydrateRoot (repo\node_modules\.pnpm\react-dom@18.2.0_react@18.2.0\node_modules\react-dom\cjs\react-dom.development.js:29403:11)
at hydrateRoot$1 (repo\node_modules\.pnpm\react-dom@18.2.0_react@18.2.0\node_modules\react-dom\cjs\react-dom.development.js:29810:10)
at file:///repo/node_modules/.pnpm/vite-react-ssg@0.5.2_react-dom@18.2.0_react-router-dom@6.21.1_react@18.2.0_vite@5.0.11/node_modules/vite-react-ssg/dist/index.mjs:172:11
at Object.startTransition (repo\node_modules\.pnpm\react@18.2.0\node_modules\react\cjs\react.development.js:2433:5)
at file:///repo/node_modules/.pnpm/vite-react-ssg@0.5.2_react-dom@18.2.0_react-router-dom@6.21.1_react@18.2.0_vite@5.0.11/node_modules/vite-react-ssg/dist/index.mjs:171:15
It seems that using mock: true doesn't works .
I think the problem came from
here, the document is the default document from JSDomGlobal . And so, doesn't contain the rootContainer