muhdfaiz/js-loading-overlay

Remove external dependency

Mika56 opened this issue · 1 comments

We'll be using your package in one of our project.
However, I've discovered that this package will inject a <style> element in the <head>, pointing to jsdelivr CDN.
We're not big fans of using external resources for various reasons (mainly availability and security).

Proposed change

  • Add an option named disableCDN (bool) or stylesheetBaseURL (string|false), which would disable auto inserting of <link> element, or point it to a custom CDN.
  • Add load-awesome to the package.json's peerDependencies element, skipping its installation by default if users want to use a CDN

@Mika56 Thank you for your suggestion. I agree that it's better if you have an option to disable the stylesheet injection.

2 changes I will make like your suggestion

  • I will add the option that allows user to use their own stylesheet URL
  • Load the CSS file from load-awesome package instead of using CDN.