{"action":"created","issue":{"url":"https://api.github.com/repos/azu/rc-config-loader/issues/3","repository_url":"https://api.github.com/repos/azu/rc-config-loader","labels_url":"https://api.github.com/repos/azu/rc-config-loader/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/azu/rc-config-loader/issues/3/comments","events_url":"https://api.github.com/repos/azu/rc-config-loader/issues/3/events","html_url":"https://github.com/azu/rc-config-loader/issues/3","id":385606278,"node_id":"MDU6SXNzdWUzODU2MDYyNzg=","number":3,"title":"rc-config-loader doesn't view config file in current path","user":{"login":"ravecat","id":24782863,"node_id":"MDQ6VXNlcjI0NzgyODYz","avatar_url":"https://avatars3.githubusercontent.com/u/24782863?v=4","gravatar_id":"","url":"https://api.github.com/users/ravecat","html_url":"https://github.com/ravecat","followers_url":"https://api.github.com/users/ravecat/followers","following_url":"https://api.github.com/users/ravecat/following{/other_user}","gists_url":"https://api.github.com/users/ravecat/gists{/gist_id}","starred_url":"https://api.github.com/users/ravecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravecat/subscriptions","organizations_url":"https://api.github.com/users/ravecat/orgs","repos_url":"https://api.github.com/users/ravecat/repos","events_url":"https://api.github.com/users/ravecat/events{/privacy}","received_events_url":"https://api.github.com/users/ravecat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-29T07:39:00Z","updated_at":"2018-12-01T20:02:58Z","closed_at":null,"author_association":"NONE","body":"Accorind sources, if I haven't options `rc-config-loader` use default path for search - current directory\r\n\r\n```\r\nconst configFileName = opts.configFileName || `.${pkgName}rc`;\r\n```\r\n\r\nSo I use loader  without options and get `undefined`. Code available here\r\n\r\n1. `git clone https://github.com/ravecat/mendeleev.git --single-branch --branch rc-config-loader-issue`\r\n2. `yarn`\r\n\r\nI have code in `src/common/Media/helpers/getConfig.js`\r\n\r\n```javascript\r\nconst rcfile = require(\"rc-config-loader\");\r\n\r\nconst getConfig = () => {\r\n  console.log(rcfile(\"sct\"));\r\n \r\n  debugger\r\n  return \r\n}\r\n\r\nexport default getConfig\r\n```\r\n\r\nand try to use in `src/common/Media/responsive/index.js`\r\n\r\n```javascript\r\nimport { css } from \"styled-components\";\r\nimport getConfig from '../helpers/getConfig'\r\n\r\nconst responsive = (property, resolution) => {\r\n  const resolutions = getConfig()\r\n\r\n  return css`\r\n    @media (max-width: ${resolution}px) {\r\n      ${property};\r\n    }\r\n  `;\r\n}\r\n\r\nexport default responsive;\r\n\r\n```\r\n\r\nProbably it's webpack settings relative with resolve options, but I use relative path, not absolute"},"comment":{"url":"https://api.github.com/repos/azu/rc-config-loader/issues/comments/443454269","html_url":"https://github.com/azu/rc-config-loader/issues/3#issuecomment-443454269","issue_url":"https://api.github.com/repos/azu/rc-config-loader/issues/3","id":443454269,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzQ1NDI2OQ==","user":{"login":"ravecat","id":24782863,"node_id":"MDQ6VXNlcjI0NzgyODYz","avatar_url":"https://avatars3.githubusercontent.com/u/24782863?v=4","gravatar_id":"","url":"https://api.github.com/users/ravecat","html_url":"https://github.com/ravecat","followers_url":"https://api.github.com/users/ravecat/followers","following_url":"https://api.github.com/users/ravecat/following{/other_user}","gists_url":"https://api.github.com/users/ravecat/gists{/gist_id}","starred_url":"https://api.github.com/users/ravecat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravecat/subscriptions","organizations_url":"https://api.github.com/users/ravecat/orgs","repos_url":"https://api.github.com/users/ravecat/repos","events_url":"https://api.github.com/users/ravecat/events{/privacy}","received_events_url":"https://api.github.com/users/ravecat/received_events","type":"User","site_admin":false},"created_at":"2018-12-01T20:02:58Z","updated_at":"2018-12-01T20:02:58Z","author_association":"NONE","body":"Hm, I get config tests\r\n\r\n```\r\n PASS  src/common/Media/responsive/index.test.js\r\n  ● Console\r\n\r\n    console.log src/common/Media/responsive/index.js:7\r\n      { config: { responsive: [ 1023, 1600 ] },\r\n        filePath: '/home/max/project/mendeleev/.sctrc' }\r\n\r\n```\r\n\r\nbut get `undefined` in web app, probably it depends from runtime environment"}}
{"actor":{"display_login":"ravecat"}}