The thing that could
module.exports = {
// Base directory for all the code, slightly optional but good practice
context: 'src',
// Entry file to start processing
entry: [ './app/js/app.js' ],
// Meat of how things are done
module: {
loaders: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loaders: ['babel-loader']
},
{ test: /\.(gif|jpg|jpeg|png|webm)$/, loader: 'file-loader' }
]
},
// where it should be outputted to
output: {
filename: 'js/[name].js',
path: path.join(__dirname, './dist'),
publicPath: '/'
},
// where are the files found
resolve: {
modulesDirectories: ['node_modules']
}
};
module.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/messages', {
templateUrl: 'partials/message-list.html',
controller: 'MessageListCtrl'
})
}
])
module.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/messages', {
template: require('./partials/message-list.html'),
controller: 'MessageListCtrl'
})
}
])