{"action":"created","issue":{"url":"https://api.github.com/repos/react-toolbox/react-toolbox/issues/396","repository_url":"https://api.github.com/repos/react-toolbox/react-toolbox","labels_url":"https://api.github.com/repos/react-toolbox/react-toolbox/issues/396/labels{/name}","comments_url":"https://api.github.com/repos/react-toolbox/react-toolbox/issues/396/comments","events_url":"https://api.github.com/repos/react-toolbox/react-toolbox/issues/396/events","html_url":"https://github.com/react-toolbox/react-toolbox/issues/396","id":142429391,"number":396,"title":"NPM link workflow","user":{"login":"mgcrea","id":108273,"avatar_url":"https://avatars.githubusercontent.com/u/108273?v=3","gravatar_id":"","url":"https://api.github.com/users/mgcrea","html_url":"https://github.com/mgcrea","followers_url":"https://api.github.com/users/mgcrea/followers","following_url":"https://api.github.com/users/mgcrea/following{/other_user}","gists_url":"https://api.github.com/users/mgcrea/gists{/gist_id}","starred_url":"https://api.github.com/users/mgcrea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgcrea/subscriptions","organizations_url":"https://api.github.com/users/mgcrea/orgs","repos_url":"https://api.github.com/users/mgcrea/repos","events_url":"https://api.github.com/users/mgcrea/events{/privacy}","received_events_url":"https://api.github.com/users/mgcrea/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-03-21T18:16:06Z","updated_at":"2016-04-11T16:02:58Z","closed_at":"2016-04-11T16:02:58Z","body":"I'm encountering build issues when trying to use a local linked version of `react-toolbox`:\r\n\r\n```\r\n    ERROR in /Users/olivier/Developer/react/react-toolbox/~/css-loader?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!/Users/olivier/Developer/react/react-toolbox/~/postcss-loader!/Users/olivier/Developer/react/react-toolbox/~/sass-loader?sourceMap!/Users/olivier/Developer/react/react-toolbox/~/toolbox-loader!/Users/olivier/Developer/react/react-toolbox/lib/avatar/style.scss\r\n    Module build failed: Error: ENOENT: no such file or directory, open '/Users/olivier/Projects/foo/bar/theme.scss'\r\n        at Error (native)\r\nChild extract-text-webpack-plugin:\r\n```\r\n\r\nDo you use NPM linking feature while developing other apps built over `react-toolbox`? Any feedback on theses issues?"},"comment":{"url":"https://api.github.com/repos/react-toolbox/react-toolbox/issues/comments/208425312","html_url":"https://github.com/react-toolbox/react-toolbox/issues/396#issuecomment-208425312","issue_url":"https://api.github.com/repos/react-toolbox/react-toolbox/issues/396","id":208425312,"user":{"login":"mgcrea","id":108273,"avatar_url":"https://avatars.githubusercontent.com/u/108273?v=3","gravatar_id":"","url":"https://api.github.com/users/mgcrea","html_url":"https://github.com/mgcrea","followers_url":"https://api.github.com/users/mgcrea/followers","following_url":"https://api.github.com/users/mgcrea/following{/other_user}","gists_url":"https://api.github.com/users/mgcrea/gists{/gist_id}","starred_url":"https://api.github.com/users/mgcrea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgcrea/subscriptions","organizations_url":"https://api.github.com/users/mgcrea/orgs","repos_url":"https://api.github.com/users/mgcrea/repos","events_url":"https://api.github.com/users/mgcrea/events{/privacy}","received_events_url":"https://api.github.com/users/mgcrea/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T16:02:58Z","updated_at":"2016-04-11T16:02:58Z","body":"Ok I've finally got it for good!\r\n\r\nI can link to any version of `react-toolbox` and even import components I'm working on, using `import Avatar from 'react-toolbox/components/avatar';`\r\n\r\nThe working config is:\r\n\r\n```js\r\nconst modulesPath = path.join(__dirname, 'node_modules');\r\n\r\n...\r\n\r\n  resolve: {\r\n    extensions: ['', '.js', '.jsx', '.json', '.scss'],\r\n    packageMains: ['browser', 'web', 'browserify', 'main', 'style'], // support `style` main field for normalize.css\r\n    fallback: modulesPath, // support linked modules,\r\n    alias: {\r\n      react: fs.realpathSync(path.join(modulesPath, 'react')) // force components to use a local copy\r\n    },\r\n    root: srcPath\r\n  },\r\n  resolveLoader: {\r\n    fallback: modulesPath // support linked modules\r\n  },\r\n  module: {\r\n    loaders: [{\r\n      test: /\\.jsx?$/,\r\n      include: [srcPath, fs.realpathSync(path.join(modulesPath, 'react-toolbox/components'))], // `realpath` is used to support linked modules\r\n      loaders: ['babel']\r\n    }, ...]\r\n  },\r\n```\r\n\r\n"}}