crisward / riot-routehandler

An angular-ui style minimalist route handler for riot.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Webpack support for Riot 2.*

mikey0000 opened this issue · comments

Doesn't play nice with Webpack. Getting the following errors.

routehandler.js:7Uncaught Error: Cannot find module "."

as well as

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

seems switching the require check to this solves the issue

if(typeof exports === "object" && exports) {

Thanks for spotting this. I use browserify with this and don't have any issues, though I'll be happy to update. Plan to do a riot 3.0 update soon, so will include this as part of the update. Will maintain a riot 2.* version for a while as I'm still using riot 2.* in all my projects so far.

Thanks, really appreciate it!

I'll aim to do this as part of the riot 3.0 update. Should be done next weekend.

I've just changed the check for v3.0.1 and pushed to npm.
Please re-open if this hasn't fixed it. Please note this requires riot 3.0.2. If you need this for riot 2 let me know.

Yes please to riot 2 support, unfortunately I'm stuck on 2 because of a dep

I've pushed that update to the Riot2 branch too.

Also push to npm - version 1.2.4

Please re-open if you still have problems