title: Subresource Integrity in angularJS App which uses Require JS
body: <p>I have an angular application with below index.html file</p>
  
  <p>Consider in my index.html page I have the following code for SRI (SubResource Integrity)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Security-Policy" 
        content="script-src 'self' scripts/alert.js 'unsafe-inline' 'unsafe-eval' 'sha256-qznLcsROx4GACP2dm0UCKCzCG+HiZ1guq6ZZDob/Tng='"&gt;
  
  &lt;script src="scripts/alert.js"
          integrity="sha256-qznLcsROx4GACP2dm0UCKCzCG+HiZ1guq6ZZDob/Tng="
          crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p></p>
  
  <p>In case, if I am using require JS, then I have to move the script inclusion of 'alert.js' to 'main.js' file as below</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>require.config({
  
  
      // alias libraries paths
      paths: {
              'jquery': '/scripts/alert'
              },
      // kick start application
      deps: ['../app/require.bootstrap']
   })</code></pre>
  </div>
  </div>
  </p>
  
  <p>Can someone help me how to include the integrity attribute to the main.js file while referring the alert.js script in the paths.</p>