{"action":"closed","issue":{"url":"https://api.github.com/repos/vuejs/vue-router/issues/2117","repository_url":"https://api.github.com/repos/vuejs/vue-router","labels_url":"https://api.github.com/repos/vuejs/vue-router/issues/2117/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-router/issues/2117/comments","events_url":"https://api.github.com/repos/vuejs/vue-router/issues/2117/events","html_url":"https://github.com/vuejs/vue-router/issues/2117","id":306665000,"number":2117,"title":"Can not find module for recursive function","user":{"login":"pythonxCat","id":32242633,"avatar_url":"https://avatars1.githubusercontent.com/u/32242633?v=4","gravatar_id":"","url":"https://api.github.com/users/pythonxCat","html_url":"https://github.com/pythonxCat","followers_url":"https://api.github.com/users/pythonxCat/followers","following_url":"https://api.github.com/users/pythonxCat/following{/other_user}","gists_url":"https://api.github.com/users/pythonxCat/gists{/gist_id}","starred_url":"https://api.github.com/users/pythonxCat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pythonxCat/subscriptions","organizations_url":"https://api.github.com/users/pythonxCat/orgs","repos_url":"https://api.github.com/users/pythonxCat/repos","events_url":"https://api.github.com/users/pythonxCat/events{/privacy}","received_events_url":"https://api.github.com/users/pythonxCat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-19T22:43:59Z","updated_at":"2018-03-19T22:44:00Z","closed_at":"2018-03-19T22:44:00Z","author_association":"NONE","body":"<!--\r\nIMPORTANT: Please use the following link to create a new issue:\r\n\r\n  https://new-issue.vuejs.org/?repo=vuejs/vue-router\r\n\r\nIf your issue was not created using the app above, it will be closed immediately.\r\n-->\r\nMy vue-router's version is **^3.0.1**.\r\nI write a lazy recursive function like following:\r\n`\r\nfunction loadComponent(comppath, delay = 200, timeout = 3000, loadingComp = loadingComp, errorComp = ErrorComp) {\r\nreturn function () {\r\n    return {\r\n      component: import(compPath),\r\n      loading: loadingComp,\r\n      error: errorComp,\r\n      delay,\r\n      timeout\r\n    }\r\n  }\r\n}\r\n// load component in async way\r\nexport default new Router({\r\n  routes: [\r\n    {\r\n      path: '/',\r\n      name: 'index',\r\n      component: loadComponent('@/router/views/Index')\r\n    }\r\n ]\r\n})\r\n`\r\n\r\nVue devtool remind me errors, `vue-router.esm.js?fe87:1905 Error: Cannot find module '@/router/views/Index'.\r\n    at eval (eval at ./src/router lazy recursive (app.js:1143), <anonymous>:5:9)`\r\n"}}
{"actor":{"display_login":"vue-issue-bot"}}