Skip to content

How do I self-host all the js files? #9

@php4fan

Description

@php4fan

When using your CDN, I sometimes randomly get errors like this:

image

(sorry for posting a picture rather than a screenshot, it's what I have handy right now)

So, for my projects, I downloaded your files KV.latest.min.js and KV.WalletUIHandler.latest.min.js and I load them from my own server.

My html code:

<script 
  src="js/3p/kv/KV.latest.min.js" 
  onload='shield("js/my_script.js, null, "head", "script", 0);'></script>

And my js code in my_script.js starts with:

KV.init(["js/3p/kv/KV.WalletUIHandler.latest.min.js"]).then(function(res){
  //.......
});

I also downloaded the files web3_3.0.0-rc.5.min.js and walletconnect_1.7.1.min.js from your CDN and put them into the same folder on my server where your KV.*.js files are.

I have checked that the files KV.latest.min.js and KV.WalletUIHandler.latest.min.js are loaded from where I host them on my server. But the dependencies web3_3.0.0-rc.5.min.js and walletconnect_1.7.1.min.js (which are loaded from your scripts) are still loaded from your CDN, and therefore, they sometimes randomly fail to load with the errors mentioned above.

How do I get all the dependencies to load from an arbitrary path, or at least from a given path relative to where yours are loaded from or relative to my root?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions