How to use Dropbox-sdk-js in the browser?
<p>I have been trying to get the <a href="https://github.com/dropbox/dropbox-sdk-js" rel="nofollow">dropbox-sdk-js</a> running in the browser. The sdk is developped for node. </p>

<p>What I need is to include the sdk in a <code>&lt;script&gt;</code> tag and start using the SDK in JS.</p>

<p>I tried Webpack and Browserify. But none of them seem to unentangle the <code>Dropbox</code> js object from <code>require</code> for me to use in the browser. Simply <code>requre</code> is undefined both after webpack and browsify. </p>

<p><strong>-- Reproduce --</strong></p>

<ol>
<li><p>Go to the root folder of the repo and execute <code>webpack</code>. This will read <code>webpack.config.js</code> and create <code>dropbox-sdk.js</code> in <code>dist</code> folder</p></li>
<li><p>Include the file in my script <code>&lt;script src="dropbox-sdk.js"&gt;&lt;/script&gt;</code></p></li>
<li><p>Undefined error come when I try to execute <code>var Dropbox = require('dropbox');</code></p></li>
</ol>

<p>The script is guaranteed to be included correctly. Even tried to use a precompiled one from <a href="https://cdnjs.cloudflare.com/ajax/libs/dropbox.js/2.4.0/dropbox-sdk.js" rel="nofollow">this</a> CDN.</p>

<p>Any help is appreciated.</p>