From 1792817e7680a033006469629743ea9de2bdb4ff Mon Sep 17 00:00:00 2001 From: Hugh Kennedy Date: Thu, 27 Feb 2014 16:20:57 +1100 Subject: [PATCH] Browserify compatability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When bundling router-component with browserify, the require calls for both route-component and route were being picked up – because route was missing, this would crash browserify. "remove-catch-require" will, when being used with browserify, transform the source to remove the second require call and allow for the bundle to complete successfully. --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f20aa06..e2f699f 100644 --- a/package.json +++ b/package.json @@ -5,12 +5,16 @@ "version": "0.0.1", "keywords": [], "dependencies": { - "route-component": "0.2.0" + "route-component": "0.2.0", + "remove-catch-require": "0.0.0" }, "devDependencies": { "mocha": "*", "better-assert": "*" }, + "browserify": { + "transform": ["remove-catch-require"] + }, "license": "MIT", "scripts": [ "index.js"