We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6c29b4 commit a6edb50Copy full SHA for a6edb50
packages/common/refresh-utils.ts
@@ -98,6 +98,7 @@ export function virtualPreamblePlugin({
98
transform: {
99
filter: { code: /__REACT_DEVTOOLS_GLOBAL_HOOK__/ },
100
handler(code) {
101
+ // this is expected to be either `react` or `react-dom/client`
102
if (isEnabled() && code.includes('__REACT_DEVTOOLS_GLOBAL_HOOK__')) {
103
return `import ${JSON.stringify(name)};` + code
104
}
packages/plugin-react/package.json
@@ -21,8 +21,7 @@
21
],
22
"type": "module",
23
"exports": {
24
- ".": "./dist/index.js",
25
- "./preamble": "./preamble.d.ts"
+ ".": "./dist/index.js"
26
},
27
"scripts": {
28
"dev": "tsdown --watch ./src --watch ../common",
packages/plugin-react/preamble.d.ts
0 commit comments