So, I am writing an application with the node/express + jade combo.
var m = require('./messages');
Uncaught ReferenceError: require is not defined
This is because
You have three options:
CommonJS client side-implementations include:
(most of them require a build step before you deploy)
You can read more about my comparison of Browserify vs Component.
AMD implementations include:
Note, in your search for choosing which one to go with, you'll read about Bower. Bower is only for package dependencies and is unopinionated on module definitions like CommonJS and AMD.
Hope this helps some.
rollup. I think it's safe to say that in 2016, it's best to avoid
component. I'll eventually remove it from the list.