title: cy.request does not work from Cypress plugin file?
body: <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code> return cy.request('https://webiste.com/config.json').then( (appConfig) =&gt; {
    // save to Cypress.config
   });</code></pre>
  </div>
  </div>
  </p>
  
  <p>The above code threw this error:</p>
  
  <p>The function exported by the plugins file threw an error.</p>
  
  <p>We invoked the function exported by 'C:\projects\nfe-credit-flow\cypress\plugins\index.js', but it threw an error.</p>
  
  <p>The following error was thrown:</p>
  
  <blockquote>
    <p>ReferenceError: cy is not defined
        at Promise.then (C:\projects\nfe-credit-flow\cypress\plugins\index.js:74:4)
        at tryCatcher (C:\projects\nfe-credit-flow\node_modules\bluebird\js\release\util.js:16:23)
        at Promise._settlePromiseFromHandler (C:\projects\nfe-credit-flow\node_modules\bluebird\js\release\promise.js:512:31)
        at Promise._settlePromise (C:\projects\nfe-credit-flow\node_modules\bluebird\js\release\promise.js:569:18)
        at Promise._settlePromise0 (C:\projects\nfe-credit-flow\node_modules\bluebird\js\release\promise.js:614:10)
        at Promise._settlePromises (C:\projects\nfe-credit-flow\node_modules\bluebird\js\release\promise.js:693:18)</p>
  </blockquote>