baseprime / grapnel

The smallest JavaScript router with named parameters, HTML5 pushState, and middleware support
http://grapnel.js.org
468 stars 40 forks source link

Does not work with require() (Webpack) #28

Closed Nicolab closed 9 years ago

Nicolab commented 9 years ago

Hi,

'use strict';
var Grapnel = require('grapnel');

var router = new Grapnel({hashBang: true});

router.get('hello', function() {
  console.log('route ', arguments);
});

This code works if Grapnel is added with , but does not work with require('grapnel') (Webpack).

Any idea please? Thanks