-
-
Notifications
You must be signed in to change notification settings - Fork 198
Closed as not planned
Description
Related plugins
Description
React developer tool works also in production by default...
It might be a security hole!
Suggested solution
Might the vite plugin inject this code on index.html as said in this thread?
<script>
window.__REACT_DEVTOOLS_GLOBAL_HOOK__&&
(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject=function(){})
</script>Alternative
We can inject manually the script tag in our main.html file:
<script>
window.__REACT_DEVTOOLS_GLOBAL_HOOK__&&
(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject=function(){})
</script>A good idea might be documenting it.
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.