-
-
Notifications
You must be signed in to change notification settings - Fork 189
Closed as not planned
Description
Description
<!doctype html>
<html>
<head>
<title>react-boilerplate</title>
<script type="module">
import { createElement } from "react";
import { createRoot } from "react-dom/client";
createRoot(document.getElementById("root")).render(createElement('h1', null, 'hello world'));
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
Code above will work well if we run vite build
. But it would be better if we support jsx in <script>
tag. Just like createRoot(document.getElementById("root")).render(<h1>hello world</h1>);
Suggested solution
Support jsx in <script>
tag.
Alternative
No response
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.