{"action":"created","issue":{"url":"https://api.github.com/repos/developit/preact-cli/issues/348","repository_url":"https://api.github.com/repos/developit/preact-cli","labels_url":"https://api.github.com/repos/developit/preact-cli/issues/348/labels{/name}","comments_url":"https://api.github.com/repos/developit/preact-cli/issues/348/comments","events_url":"https://api.github.com/repos/developit/preact-cli/issues/348/events","html_url":"https://github.com/developit/preact-cli/issues/348","id":254803264,"number":348,"title":"Multiple watch folders?","user":{"login":"nygdjs","id":5213445,"avatar_url":"https://avatars1.githubusercontent.com/u/5213445?v=4","gravatar_id":"","url":"https://api.github.com/users/nygdjs","html_url":"https://github.com/nygdjs","followers_url":"https://api.github.com/users/nygdjs/followers","following_url":"https://api.github.com/users/nygdjs/following{/other_user}","gists_url":"https://api.github.com/users/nygdjs/gists{/gist_id}","starred_url":"https://api.github.com/users/nygdjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nygdjs/subscriptions","organizations_url":"https://api.github.com/users/nygdjs/orgs","repos_url":"https://api.github.com/users/nygdjs/repos","events_url":"https://api.github.com/users/nygdjs/events{/privacy}","received_events_url":"https://api.github.com/users/nygdjs/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-02T10:21:54Z","updated_at":"2017-09-26T17:18:14Z","closed_at":"2017-09-26T17:18:14Z","author_association":"NONE","body":"How is it possible to specify more than one (by default `/src`) watch folder for the dev server (`npm start`)?\r\n\r\nThe reason is that I'm developing an app, which has some npm dependencies, which I'm also developing, and they are scoped/private packages, so will reside in something like `/node_modules/@scope/`, so watching this folder and linking those dependencies there would be awesome.\r\nIs it possible somehow? (Of course `/src` needs to be watched too.) \r\n\r\n`npm link` would solve the issue ofc., but has a long and troubled history with webpack, because of symlinks, so my current solution is that I copy the dependencies on change with [wml](https://github.com/wix/wml) to the apps node_modules folder, but  it won't cause a live reload on the dev server.\r\n\r\nThanks for the answer!\r\n"},"comment":{"url":"https://api.github.com/repos/developit/preact-cli/issues/comments/332270866","html_url":"https://github.com/developit/preact-cli/issues/348#issuecomment-332270866","issue_url":"https://api.github.com/repos/developit/preact-cli/issues/348","id":332270866,"user":{"login":"lukeed","id":5855893,"avatar_url":"https://avatars1.githubusercontent.com/u/5855893?v=4","gravatar_id":"","url":"https://api.github.com/users/lukeed","html_url":"https://github.com/lukeed","followers_url":"https://api.github.com/users/lukeed/followers","following_url":"https://api.github.com/users/lukeed/following{/other_user}","gists_url":"https://api.github.com/users/lukeed/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeed/subscriptions","organizations_url":"https://api.github.com/users/lukeed/orgs","repos_url":"https://api.github.com/users/lukeed/repos","events_url":"https://api.github.com/users/lukeed/events{/privacy}","received_events_url":"https://api.github.com/users/lukeed/received_events","type":"User","site_admin":false},"created_at":"2017-09-26T17:18:14Z","updated_at":"2017-09-26T17:18:14Z","author_association":"COLLABORATOR","body":"I don't think it's possible to watch multiple \"src\"-type directories in Webpack -- at least, not without running multiple compilers.\r\n\r\nYou can continue to play with symlinks, as you've suggested, or you can play with the [`watchOptions`](https://webpack.js.org/configuration/watch/#watchoptions). Our [included config](https://github.com/developit/preact-cli/blob/81c7bb23e9c00ba96da1c4b9caec0350570b8929/src/lib/webpack/webpack-client-config.js#L177-L182) ignores all `node_modules` by default for apparent reasons.\r\n\r\nGoing to close, but I hope that helped in some way 😬 Sorry for the delay -- this was just brought to my attention. 🌴 "}}
{"actor":{"display_login":"lukeed"}}