{"action":"created","issue":{"url":"https://api.github.com/repos/johnsoftek/plugin-jade/issues/9","labels_url":"https://api.github.com/repos/johnsoftek/plugin-jade/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/johnsoftek/plugin-jade/issues/9/comments","events_url":"https://api.github.com/repos/johnsoftek/plugin-jade/issues/9/events","html_url":"https://github.com/johnsoftek/plugin-jade/issues/9","id":102807901,"number":9,"title":"Broken bundle","user":{"login":"panicbit","id":628445,"avatar_url":"https://avatars.githubusercontent.com/u/628445?v=3","gravatar_id":"","url":"https://api.github.com/users/panicbit","html_url":"https://github.com/panicbit","followers_url":"https://api.github.com/users/panicbit/followers","following_url":"https://api.github.com/users/panicbit/following{/other_user}","gists_url":"https://api.github.com/users/panicbit/gists{/gist_id}","starred_url":"https://api.github.com/users/panicbit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panicbit/subscriptions","organizations_url":"https://api.github.com/users/panicbit/orgs","repos_url":"https://api.github.com/users/panicbit/repos","events_url":"https://api.github.com/users/panicbit/events{/privacy}","received_events_url":"https://api.github.com/users/panicbit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-24T14:32:25Z","updated_at":"2015-08-25T15:21:14Z","closed_at":null,"body":"Since `jspm 0.16.1` bundles including `jade` templates seem to be broken.\r\nUsing such a bundle results in:\r\n```\r\nError: Module undefined not declared as a dependency.\r\n\tError loading http://localhost:8000/index.js\r\n    at http://localhost:8000/jspm_packages/system.js:4:21254\r\n    at http://localhost:8000/build.js:16:14\r\n    at u (http://localhost:8000/jspm_packages/system.js:4:21145)\r\n    at i (http://localhost:8000/jspm_packages/system.js:4:20761)\r\n    at http://localhost:8000/jspm_packages/system.js:4:21223\r\n    at http://localhost:8000/build.js:6:3\r\n    at u (http://localhost:8000/jspm_packages/system.js:4:21145)\r\n    at a (http://localhost:8000/jspm_packages/system.js:4:19710)\r\n    at Object.Promise.all.then.execute (http://localhost:8000/jspm_packages/system.js:4:24206)\r\n    at b (http://localhost:8000/jspm_packages/system.js:4:8159)\r\n```\r\nThe generated bundle looks like this:\r\n\r\n```js\r\nSystem.registerDynamic(\"index.js\", [\"index.jade!github:johnsoftek/plugin-jade@0.5.1\"], true, function(require, exports, module) {\r\n  ;\r\n  var global = this,\r\n      __define = global.define;\r\n  global.define = undefined;\r\n  require(\"index.jade!github:johnsoftek/plugin-jade@0.5.1\");\r\n  global.define = __define;\r\n  return module.exports;\r\n});\r\n\r\nSystem.registerDynamic(\"index.jade!github:johnsoftek/plugin-jade@0.5.1\", [], true, function(require, exports, module) {\r\n  ;\r\n  var global = this,\r\n      __define = global.define;\r\n  global.define = undefined;\r\n  var jade = require(\"undefined\");\r\n  module.exports = function template(locals) {\r\n    var buf = [];\r\n    var jade_mixins = {};\r\n    var jade_interp;\r\n    ;\r\n    return buf.join(\"\");\r\n  };\r\n  global.define = __define;\r\n  return module.exports;\r\n});\r\n\r\n//# sourceMappingURL=build.js.map\r\n```\r\n\r\nNote the `require(\"undefined\")`.\r\n\r\n[Ref: jspm/jspm-cli#1047]"},"comment":{"url":"https://api.github.com/repos/johnsoftek/plugin-jade/issues/comments/134621633","html_url":"https://github.com/johnsoftek/plugin-jade/issues/9#issuecomment-134621633","issue_url":"https://api.github.com/repos/johnsoftek/plugin-jade/issues/9","id":134621633,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T15:21:14Z","updated_at":"2015-08-25T15:21:14Z","body":"@johnsoftek this is actually the SystemJS CJS require detection breaking down on `file:///` URLs as it thinks its a comment in the require statement. I've just added a fix for this in SystemJS at https://github.com/systemjs/systemjs/commit/4717d582801fc3e9f10727c98489fa1ffeea2cc5 which makes this work again. Patch should come today or tomorrow."}}