sula-real icon indicating copy to clipboard operation
sula-real copied to clipboard

CDN / External scripts import in browser

Open KrishnaPG opened this issue 4 years ago • 0 comments

The webpack compilation times and the output size are large.

How to load the eCharts, antd etc. directly from CDN in the HTML

tag (instead of bundling with the page) ? This allows to reduce the build output size as well as reuse the browser cache loading the CDN files (and reduce the bandwidth transfer on static site hosting).

For example:

<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.8.0/echarts.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/antd/4.4.0/antd.min.js"></script>

and remove the npm dependencies in the package.json

KrishnaPG avatar Jul 02 '20 14:07 KrishnaPG