title: How to access the window object in vue js?
body: <p>I have this vue js component:</p>
  
  <pre><code>&lt;template&gt;
      &lt;div&gt;
  hello world
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
    export default {
      name: 'mycomp',
      data: function () {
        console.error("window.google_recaptcha_public_key", window.google_recaptcha_public_key);
        return {
  
        }
      },
      mounted() {
        let app = this;
        console.error("window.google_recaptcha_public_key2", window.google_recaptcha_public_key);
  
      },
    }
  &lt;/script&gt;
  
  &lt;style scoped lang="scss"&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>returns:</p>
  
  <pre><code>window.google_recaptcha_public_key undefined 
  window.google_recaptcha_public_key2 undefined
  </code></pre>
  
  <p>where can I leave painless and happy all global configuration?</p>
  
  <p>notice this configuration lives in my laravel backend. So I wont copy paste all values from the backend to the front end</p>