Use Webpack externals
By defining the library as external, the web package just exports the global symbol for the library, which is very similar (for example, for jQuery)
{
1: function(...) {
module.exports = jQuery;
}
}
So you can do something similar to this:
Add <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>or a new URL from the Charts Home Page
In the configuration of your web package add:
externals: {
charts: 'google.charts'
}
And import it as:
import chart from 'charts'
// do something!
charts.load('current', {'packages':['corechart']});
Before downloading the package, be sure to download Google Maps.
For the ReactJS part , you need to somehow get your own DOM element in the script, using refsor something like that.
P.S. , , , -, ,