title: How to import file from public folder in react application?
body: <p>I have a javascript file in the public folder and I want to import that file to components in the folder src/components. </p>
  
  <pre><code>projectFolder
    publicFolder
      index.html
      recorder.js
    srcFolder
      componentsFolder
         Speech.js
         Speech.css
  </code></pre>
  
  <p>But I can't do something like this in my component: </p>
  
  <pre><code>import Recorder from '../../public/recorder'
  </code></pre>
  
  <p>Because I get the following error:</p>
  
  <blockquote>
    <p>Module not found: You attempted to import ../../public/recorder which
    falls outside of the project src/ directory. Relative imports outside
    of src/ are not supported. You can either move it inside src/, or add
    a symlink to it from project's node_modules/.</p>
  </blockquote>
  
  <p>As I've understood it's not allowed to import outside of /src directory, so I was wondering how I could "add a symlink" or if you know other ways to fix it.</p>