gabrielmoreira / riot-router

Riot Router - A simple routing solution for Riot
MIT License
77 stars 13 forks source link

main file router.js uses src not dist #34

Closed stukennedy closed 7 years ago

stukennedy commented 7 years ago

when building riot-router we get an error in Uglify as it doesn't recognise class Router (being es2015) It seems that you are requiring the src instead of the dist in your main package file.

var riot = require('riot');
var route = require('riot-route');
var Router = require('./src/router.js');
var router = Router.create({route: route});
if (window) {
    window.router = router;
}
module.exports = Router;

shouldn't line 3 be:

var Router = require('./dist/router.js');

?

gabrielmoreira commented 7 years ago

@continuata Thank you.

I've released Riot-Router 0.9.7 using main file "dist/router.min.js".

Can you test again?

stukennedy commented 7 years ago

sorry for not responding before now, yes that all works great now.