title: Installing a coffee script library in webpack
body: <p>I'm building an app using React &amp; webpack. I want to include a library that seems to be built using coffee script (in this <a href="https://github.com/meltingice/psd.js" rel="nofollow noreferrer">example psd</a>).</p>
  
  <p>But when I run webpack, I get the following errors:</p>
  
  <pre><code>WARNING in ./~/coffee-script/lib/coffee-script/register.js
  require.extensions is not supported by webpack. Use a loader instead.
  
  WARNING in ./~/coffee-script/lib/coffee-script/register.js
  require.extensions is not supported by webpack. Use a loader instead.
  
  WARNING in ./~/rsvp/dist/rsvp.js
  Module not found: Error: Cannot resolve module 'vertx' in /node_modules/rsvp/dist
   @ ./~/rsvp/dist/rsvp.js 1210:20-30
  
  WARNING in ./~/coffee-script/lib/coffee-script/coffee-script.js
  require.extensions is not supported by webpack. Use a loader instead.
  
  WARNING in ./~/coffee-script/lib/coffee-script/coffee-script.js
  Critical dependencies:
  157:43-50 require function is used in a way in which dependencies cannot be statically extracted
  161:26-33 require function is used in a way in which dependencies cannot be statically extracted
   @ ./~/coffee-script/lib/coffee-script/coffee-script.js 157:43-50 161:26-33
  
  WARNING in ./~/coffee-script/lib/coffee-script/browser.js
  Critical dependencies:
  8:25-32 require function is used in a way in which dependencies cannot be statically extracted
   @ ./~/coffee-script/lib/coffee-script/browser.js 8:25-32
  
  ERROR in ./~/coffee-script/bin/coffee
  Module parse failed: /node_modules/coffee-script/bin/coffee Unexpected character '#' (1:0)
  You may need an appropriate loader to handle this file type.
  SyntaxError: Unexpected character '#' (1:0)
    at Parser.pp$4.raise (/node_modules/webpack/node_modules/acorn/dist/acorn.js:2221:15)
    at Parser.pp$7.getTokenFromCode (/node_modules/webpack/node_modules/acorn/dist/acorn.js:2756:10)
    at Parser.pp$7.readToken (/node_modules/webpack/node_modules/acorn/dist/acorn.js:2477:17)
    at Parser.pp$7.nextToken (/node_modules/webpack/node_modules/acorn/dist/acorn.js:2468:15)
    at Parser.parse (/node_modules/webpack/node_modules/acorn/dist/acorn.js:515:10)
    at Object.parse (/node_modules/webpack/node_modules/acorn/dist/acorn.js:3098:39)
    at Parser.parse (/node_modules/webpack/lib/Parser.js:902:15)
    at NormalModule.&lt;anonymous&gt; (/node_modules/webpack/lib/NormalModule.js:104:16)
    at NormalModule.onModuleBuild (/node_modules/webpack-core/lib/NormalModuleMixin.js:310:10)
    at nextLoader (/node_modules/webpack-core/lib/NormalModuleMixin.js:275:25)
    at /node_modules/webpack-core/lib/NormalModuleMixin.js:259:5
    at Storage.finished (/node_modules/webpack/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:16)
    at /node_modules/graceful-fs/graceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:415:3)
  
   @ ./~/coffee-script/lib/coffee-script/register.js 52:13-48
  
  ERROR in ./~/coffee-script/lib/coffee-script/grammar.js
  Module not found: Error: Cannot resolve module 'jison' in /node_modules/coffee-script/lib/coffee-script
   @ ./~/coffee-script/lib/coffee-script/grammar.js 5:11-27
  </code></pre>
  
  <p>I've tried adding a <code>coffee-loader</code> but the error message is still present.</p>
  
  <pre><code>{
     test: /\.coffee$/,
     loader: "coffee-loader"
  }
  </code></pre>
  
  <p>Any ideas how to fix tis issue? </p>