title: How do I read yaml file using javascript with framwork vuejs
body: <p>I have Vuejs app need to read data from YAML file in the root directory, so I google it and then find some useful package on Github <a href="https://github.com/nodeca/js-yaml" rel="nofollow noreferrer">this link</a> I know they are created just for Nodejs as backend, but they have a way to work with a browser in their documentation I follow it but it's not loading my YAML file in the root directory it's just print the file name of YAML <code>../../example.yaml</code>.</p>
  
  <p>example.yaml  </p>
  
  <pre class="lang-yaml prettyprint-override"><code>greeting: hello
  name: world
  </code></pre>
  
  <p>page.vue</p>
  
  <pre><code>&lt;template&gt;
    &lt;div class="about"&gt;
      &lt;button class="btn btn-success" @click="doIt"&gt;create&lt;/button&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
  const jsyaml = require('js-yaml');
  
  export default {
    methods:{
      doIt(){
        var doc = jsyaml.load('../../example.yaml');
        console.log("your content yaml file is : ", doc);    
      }
    }
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>So my question how can I solve it?</p>