unistore icon indicating copy to clipboard operation
unistore copied to clipboard

React UMD bundle fails to execute

Open vadimavdeev opened this issue 8 years ago • 1 comments

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>

vadimavdeev avatar Dec 18 '17 17:12 vadimavdeev

Ah interesting. We'll need to add an option to Microbundle to allow configuring that.

developit avatar Dec 19 '17 17:12 developit