The URL https://unpkg.com/react-charts/dist/react-charts.production.min.js redirects to https://unpkg.com/react-charts@2.0.0-beta.7/dist/react-charts.production.min.js, an old beta version of react-charts. When I put the following script tag in my HTML
...
<script src="https://unpkg.com/react-charts/dist/react-charts.production.min.js"></script>
I get an error in the console saying Uncaught ReferenceError: require is not defined.
I tried changing the script tag to specifically reference version 2.1.0,
<script src="https://unpkg.com/react-charts@2.1.0/dist/react-charts.cjs.production.min.js"></script>
but got another error saying Uncaught ReferenceError: exports is not defined.
This was all done in Chrome.
EDIT:
I just noticed there is an esm version on UNPKG, so I tried
<script src="https://unpkg.com/react-charts@2.1.0/dist/react-charts.esm.js"></script>
which gave the error Uncaught SyntaxError: Cannot use import statement outside a module. So I tried adding the type="module"
<script src="https://unpkg.com/react-charts@2.1.0/dist/react-charts.esm.js" type="module"></script>
which also did not work. I got an Uncaught TypeError: Failed to resolve module specifier "react". Relative references must start with either "/", "./", or "../".
I think I'm going to remove the unpkg script for now :)