title: Why webpack config has to use path.resolve & path.join
body: <p>It is common seen in webpack configuration that when we need to set the path ,<strong><code>path.resolve</code></strong> or <strong><code>path.join</code></strong> are often used , I just want to figure out <strong>why</strong> we have to use them instead of a plain string path e.g. <strong><code>'../dist'</code></strong></p>
  
  <p>I partly understand maybe for some purpose , they are used to return the absolute path ,but I think the plain string path is able to function as well.</p>
  
  <p>e.g</p>
  
  <pre><code>output: {
  filename: '[name].js',
  path: path.resolve(__dirname, '../dist'),
  chunkFilename: 'js/[name].[chunkhash].js'
  }
  </code></pre>