{"action":"created","issue":{"url":"https://api.github.com/repos/spmjs/serve-spm/issues/29","labels_url":"https://api.github.com/repos/spmjs/serve-spm/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/spmjs/serve-spm/issues/29/comments","events_url":"https://api.github.com/repos/spmjs/serve-spm/issues/29/events","html_url":"https://github.com/spmjs/serve-spm/pull/29","id":54660900,"number":29,"title":"feat(prefix): add options.prefix support","user":{"login":"shepherdwind","id":452899,"avatar_url":"https://avatars.githubusercontent.com/u/452899?v=3","gravatar_id":"","url":"https://api.github.com/users/shepherdwind","html_url":"https://github.com/shepherdwind","followers_url":"https://api.github.com/users/shepherdwind/followers","following_url":"https://api.github.com/users/shepherdwind/following{/other_user}","gists_url":"https://api.github.com/users/shepherdwind/gists{/gist_id}","starred_url":"https://api.github.com/users/shepherdwind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepherdwind/subscriptions","organizations_url":"https://api.github.com/users/shepherdwind/orgs","repos_url":"https://api.github.com/users/shepherdwind/repos","events_url":"https://api.github.com/users/shepherdwind/events{/privacy}","received_events_url":"https://api.github.com/users/shepherdwind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-17T12:51:00Z","updated_at":"2015-01-18T03:41:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spmjs/serve-spm/pulls/29","html_url":"https://github.com/spmjs/serve-spm/pull/29","diff_url":"https://github.com/spmjs/serve-spm/pull/29.diff","patch_url":"https://github.com/spmjs/serve-spm/pull/29.patch"},"body":"增加`options.prefix`支持，可以结合koa-mount，在一个server下支持多个serve-spm的运行。\r\n\r\n不过没`prefix`配置支持，那么a组件下有一个index入口文件，b组件也有一个index入口，这样就会冲突了。"},"comment":{"url":"https://api.github.com/repos/spmjs/serve-spm/issues/comments/70395322","html_url":"https://github.com/spmjs/serve-spm/pull/29#issuecomment-70395322","issue_url":"https://api.github.com/repos/spmjs/serve-spm/issues/29","id":70395322,"user":{"login":"shepherdwind","id":452899,"avatar_url":"https://avatars.githubusercontent.com/u/452899?v=3","gravatar_id":"","url":"https://api.github.com/users/shepherdwind","html_url":"https://github.com/shepherdwind","followers_url":"https://api.github.com/users/shepherdwind/followers","following_url":"https://api.github.com/users/shepherdwind/following{/other_user}","gists_url":"https://api.github.com/users/shepherdwind/gists{/gist_id}","starred_url":"https://api.github.com/users/shepherdwind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shepherdwind/subscriptions","organizations_url":"https://api.github.com/users/shepherdwind/orgs","repos_url":"https://api.github.com/users/shepherdwind/repos","events_url":"https://api.github.com/users/shepherdwind/events{/privacy}","received_events_url":"https://api.github.com/users/shepherdwind/received_events","type":"User","site_admin":false},"created_at":"2015-01-18T03:41:44Z","updated_at":"2015-01-18T03:41:44Z","body":"重新描述一下我的需求吧。\r\n\r\n在一个路径下，有多个开发中的spm组件，页面是spm组件构成的，所以在同一个页面中会引入本地多个组件。目录结构如下\r\n\r\n```\r\npage\r\n|-- modA\r\n`-- modB\r\n```\r\n\r\n现在，我需要在page下启动server。modA和modB是两个spm组件，page是两个组件一起运行的。\r\n\r\n那么我预览page的时候，需要同时载入modA和modB的js，假设A的入口文件是`index.js`，B的入口文件也是`index.js`。应该怎么开发呢？\r\n\r\n现在我的做法是，对A通过`/assets/modA/index.js`路径加载，包名是`modA/index`，这样，我可以在页面上同时seajs.use两个组件了。"}}