unistore
unistore copied to clipboard
React UMD bundle fails to execute
I tried to use the UMD React build from unpkg, but it failed with Uncaught TypeError: Cannot read property 'Component' of undefined.
I think it's because it expects to find React on the global object under name react but it's actually React (with a capital R).
You can reproduce the issue by opening an html file like this in the browser:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://unpkg.com/unistore/full/react.umd.js"></script>
</head>
<body>
</body>
</html>
Ah interesting. We'll need to add an option to Microbundle to allow configuring that.