<p dir="auto">What is the easiest way to, for example, use the node.js "debug" module in a browser-only application that's currently organized with Internal Modules?</p>
<p dir="auto">I've been using Typescript for over 6 months now, and I still have this question that I've had since day 1:<br>
Do you guys recommend using a preprocessor like browserify or webpack as part of the build process for applications meant to run in the browser? That would surprise me, since the Handbook section on External Modules makes it sound like the TS compiler can do at least the basics of what they do (and the basics are all I need).</p>
<p dir="auto">However, the Handbook says "Applications not using node.js or require.js do not need to use external modules and can best be organized using the internal module concept outlined above."<br>
Perhaps I've misinterpreted what is meant by "using node.js". My code doesn't use the node interpreter. So far that Handbook blurb has made me steer clear of using other people's nodejs modules, or even in one case converting someone's library, that seemed to unnecessarily be packaged as a nodejs module, to plain js (note: I am obviously still fairly new to web development, but I do have a PhD in CS). Other than not being able to use nodejs modules, I've been completely satisfied with Internal Modules.</p>
<p dir="auto">I would be very grateful to get a response on this.</p>
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/matthiasg/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/matthiasg">@matthiasg</a> on July 17, 2015 12:16</em></p>
<p dir="auto">Since any valid JS file is supposed to be a valid TS file too it should be possible to use a standard babelified webapp project and just switch it to use TS (e.g using tsify). Sadly that is not possible right now   since there are some issues on requiring/importing dependencies and actually getting TS to emit anything (in a DI reliant project at least).</p>
<p dir="auto">I think it would be helpful if the TS team would devote some time to setup official documentation similar or even extended to what the opensource babeljs team has done (<a href="https://babeljs.io/docs/setup/" rel="nofollow">https://babeljs.io/docs/setup/</a>) with enough starters how to migrate their existing projects to TS. An official browserify plugin might also be helpful.</p>
<p dir="auto">Specifically just exchanging babelify to tsify doesnt work right now even though both implement the ES6 features used (of course if one doesnt implement a specific feature proposed that wouldnt work).</p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="95645706" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3909" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/3909/hovercard" href="https://github.com/microsoft/TypeScript/issues/3909">microsoft/TypeScript#3909</a></em></p>