title: How to fix "This dependency was not found" when importing js file?
body: <p>assets/admin/js/components/formatter.js</p>
  <pre><code>export default function addCommas(number)
  {
      console.log('aaa');
      return number;
  }
  </code></pre>
  <p>assets/admin/js/policy_rater.js</p>
  <pre><code>import addCommas from 'components/formatter';
  </code></pre>
  <p>webpack.config.js</p>
  <pre><code>// ...
  .addEntry('admin-policy', [
      // './assets/admin/js/components/formatter.js',
      &quot;./assets/admin/js/policies.js&quot;,
      './assets/admin/js/policy_rater.js',
      './assets/admin/js/components/month-filter.js',
  ])
  // ...
  </code></pre>
  <p>Running command (at least I see it in terminal, I actually run our custom command which probably calls this):</p>
  <pre><code>$ /app/node_modules/.bin/encore dev --watch
  </code></pre>
  <p>So very simple import. But when compiling, getting error:</p>
  <p>I  79 files written to web/build/act
  ERROR  Failed to compile with 1 errors                              11:20:32 AM</p>
  <p>This dependency was not found:</p>
  <ul>
  <li>components/formatter in ./assets/admin/js/policy_rater.js</li>
  </ul>
  <p>To install it, you can run: npm install --save components/formatter</p>
  <p>why it even asks me to install if it is not a third party library but just file in my codebase?</p>