Permalink
Browse files

fix wrapper

  • Loading branch information...
1 parent 002eb9b commit 95c401a00b929cac0a3cb067ff9dbe236fb0eeb9 @okv okv committed Apr 18, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/index.js
  2. +1 −1 package.json
View
@@ -56,8 +56,8 @@ module.exports.wrapper = function(params) {
params = params || {};
params.baseUrl = params.baseUrl || '';
return function(req, res, next) {
- // remove query string and js extension
- var url = params.baseUrl + req.url.replace(/(\.js\?.+$)/, '');
+ // remove query string, baseUrl and js extension
+ var url = req.url.replace(params.baseUrl, '').replace(/(\.js\?.+$)/, '');
var config = params.modules[url];
if (config) {
if (!config.path) {
View
@@ -1,6 +1,6 @@
{
"name": "requirejs-common-wrap-middleware",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "requirejs common wrap middleware",
"author": "Pavel Vlasov <freakycue@gmail.com>",
"repository": {

0 comments on commit 95c401a

Please sign in to comment.