var $ = require('jquery')(window);
var Handlebars = require('handlebars');
var Backbone = require('backbone');
Backbone.$ = $;
var header = require('templates/header.hbs');
require('../../styles/main.less');
require('../../../bower_components/bootstrap/less/bootstrap.less');
require('../../../bower_components/font-awesome/less/font-awesome.less');
var headerView = Backbone.View.extend({
el: $('#mainheader'),
render: function(){
var compiledTemplate = Handlebars.compile( header );
// Append our compiled template to this Views "el"
this.$el.append( compiledTemplate );
}
});
module.exports = new headerView();
我正在尝试使用browserify在Backbone项目中包含更少的文件。
当我创建bundle.js文件时,我收到以下错误: