Is it possible to use brunch with ampersand?

73 views Asked by At

I am trying to use ampersand with brunch instead of browserify but it causes some problems.

Here is the code :

"use strict";

var View = require("ampersand-view");

var HelloView = View.extend({
    autoRender: true,
    template: '<p>Hello</p>'
});

var app = new HelloView();

document.body.appendChild(app.el);

brunch-config file has :

npm:
    enabled: true

The brunch build command is OK but when I run the page in the browser I get :

View.extend is not a function

A console.log for the View object gives me a "function baseCopy()" object.

Is it not possible at all to use ampersand with brunch (without a browserify plugin) ?

0

There are 0 answers