title: webpack externals for browser
body: <p>in my server part, I can configure webpack.config like this:</p>
  <pre><code>{
    externals:[
      'something': 'commonjs2 ../something`
    ]
  }
  </code></pre>
  <p>this keeps <code>require('../something')</code> so when I modify <code>../something.js</code> I don't have to rebuild the server part again.</p>
  <p>and when I serve it, the new modifications are being shown as expected.</p>
  <p>now I want to implement the same idea for the browser part.</p>
  <p>in my browser script, I also need to import something like that</p>
  <pre><code>// browser/file.ts
  import anything from 'something'
  console.log(anything)
  </code></pre>
  <p>without adding something to webpack.externals[] it works fine.
  but I want to externalize it, so I can modify the file <code>../something.js</code> after compiling without the need to rebuild it again with webpack.</p>
  <p>I tried:</p>
  <pre><code>{
    externals:[
      'something': 'commonjs2 ../something'
    ]
  }
  </code></pre>
  <p>I also tried <code>amd</code>, <code>commonjs</code>, <code>root</code> without success.</p>
  <p>please note that 'something' is imported into a .ts file, not .html one so I don't want to implement it like <code>&lt;script src=&quot;../something.js&quot; /&gt;</code></p>