Slide 6
Slide 6 text
LOADERS
"Loaders allow you to preprocess files as you require() or
“load” them"
module: {
loaders: [
{ test: /\.csx.coffee$/, loaders: ['coffee', 'cjsx']},
{ test: /^(?=.*coffee)(?!.*csx).*/, loader: 'coffee' },
{ test: /\.html$/, loader: "mustache"},
{ test: /\.json$/, loader: "json"}
]
}
Loaders can be resolved from anywhere, node_modules is
conveniently used by default
They can be chained, making them very powerful