Closed lisonge closed 2 years ago
@vitejs/plugin-react will inject
@vitejs/plugin-react
<script type="module"> import RefreshRuntime from "/@react-refresh" RefreshRuntime.injectIntoGlobalHook(window) window.$RefreshReg$ = () => {} window.$RefreshSig$ = () => (type) => type window.__vite_plugin_react_preamble_installed__ = true </script>
to index.html document.head
document.head
but vite-plugin-monkey existing installation mode will just inject /@vite/client and /src/main.jsx
vite-plugin-monkey
/@vite/client
/src/main.jsx
so React and @vitejs/plugin-react can not work with vite-plugin-monkey
React
finallly, vite-plugin-monkey need to use other installation
try fix by https://github.com/lisonge/vite-plugin-monkey/releases/tag/v1.0.0-alpha.0
fixed -> https://github.com/lisonge/vite-plugin-monkey/blob/v1.0.0/CHANGELOG.md#100
@vitejs/plugin-react
will injectto index.html
document.head
but
vite-plugin-monkey
existing installation mode will just inject/@vite/client
and/src/main.jsx
so
React
and@vitejs/plugin-react
can not work withvite-plugin-monkey
finallly,
vite-plugin-monkey
need to use other installation