We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi possible to compile for browser only ( es5 or umd ) , for non nodejs project
The text was updated successfully, but these errors were encountered:
Can you explain a little what you mean? Like being able to add the scripts directly on your html?
Sorry, something went wrong.
yeah to be able to be call using <script src="" /> without webpack, like react.js itself we can call in html directly.
Can you provide a code example on how are you using react component with that setup? Thanks
In react if you use browser only ( non nodejs ) you just import in the header directly
<html> <head> <script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script> <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script> <script type="text/javascript" src="/index.js"></script> </head> <body> <div id="root" ></div> </body> </html>
index.js
ReactDOM.createRoot(document.getElementById("root")).render(<h1>Hello World</h1>);
Perhaps you can include the final min.js or js in dist folder
No branches or pull requests
Hi possible to compile for browser only ( es5 or umd ) , for non nodejs project
The text was updated successfully, but these errors were encountered: