var message = require('./home');
console.log(message());
home.js.coffee
module.exports = ->
'Hello!'
produces the following error:
Error while running `/Users/adrian/Code/exampleapp/./node_modules/.bin/browserify --list`:
events.js:72
throw er; // Unhandled 'error' event
^
Error: Cannot find module './home' from '/Users/adrian/Code/exampleapp/app/assets/javascripts'
at /Users/adrian/Code/exampleapp/node_modules/browserify/node_modules/resolve/lib/async.js:36:25
at load (/Users/adrian/Code/exampleapp/node_modules/browserify/node_modules/resolve/lib/async.js:54:43)
at /Users/adrian/Code/exampleapp/node_modules/browserify/node_modules/resolve/lib/async.js:60:22
at /Users/adrian/Code/exampleapp/node_modules/browserify/node_modules/resolve/lib/async.js:16:47
at Object.oncomplete (fs.js:107:15)
(in /Users/adrian/Code/exampleapp/app/assets/javascripts/application.js)
As you can see, browserify doesn't recognize home.js.coffee as a valid dependency for require('./home');
After adding coffeeify to package.json and changing:
application.js
home.js.coffee
produces the following error:
As you can see, browserify doesn't recognize
home.js.coffee
as a valid dependency forrequire('./home');
After adding coffeeify to package.json and changing:
to:
everything works fine. Is this a bug or am I doing something wrong here?