How to get resource from javascript?

Hi hi,

I want to load a file of HTML in javascript. Something like this

 $.get("./component.html", function (data) {

In file atlassian-plugin, I add a new web resource

<web-resource name="Add New Component Resources" key="add-new-component-resources">
    <resource type="html" name="contributor.html" location="asset/js/wiki-panel/contributor.html">
      <param name="allow-public-use" value="true"/>

But I couldn’t require/load that file in javascript

How can I require the HTML file in javascript?
Many thanks