{"action":"opened","issue":{"url":"https://api.github.com/repos/trayio/babel-plugin-webpack-alias/issues/14","repository_url":"https://api.github.com/repos/trayio/babel-plugin-webpack-alias","labels_url":"https://api.github.com/repos/trayio/babel-plugin-webpack-alias/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/trayio/babel-plugin-webpack-alias/issues/14/comments","events_url":"https://api.github.com/repos/trayio/babel-plugin-webpack-alias/issues/14/events","html_url":"https://github.com/trayio/babel-plugin-webpack-alias/issues/14","id":169947774,"number":14,"title":"Relative paths don't work when not prefixed with ./","user":{"login":"adriantoine","id":976570,"avatar_url":"https://avatars.githubusercontent.com/u/976570?v=3","gravatar_id":"","url":"https://api.github.com/users/adriantoine","html_url":"https://github.com/adriantoine","followers_url":"https://api.github.com/users/adriantoine/followers","following_url":"https://api.github.com/users/adriantoine/following{/other_user}","gists_url":"https://api.github.com/users/adriantoine/gists{/gist_id}","starred_url":"https://api.github.com/users/adriantoine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adriantoine/subscriptions","organizations_url":"https://api.github.com/users/adriantoine/orgs","repos_url":"https://api.github.com/users/adriantoine/repos","events_url":"https://api.github.com/users/adriantoine/events{/privacy}","received_events_url":"https://api.github.com/users/adriantoine/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-08T15:13:31Z","updated_at":"2016-08-08T15:13:31Z","closed_at":null,"body":"From @vpotravnyy\r\n\r\n> We're using babel-plugin-webpack-alias for running our tests in Mocha without full build.\r\n> Today it stopped work for us after dependencies update\r\n> Upon running tests we've got such error: Error: Cannot find module 'actions/api' throwing from very first test\r\n> \r\n> Here's resolve part of our config:\r\n> ```\r\n> var path = require('path')\r\n> \r\n> module.exports = {\r\n>    \"resolve\":{\r\n>       \"root\": path.resolve(__dirname),\r\n>       \"modulesDirectories\":[\r\n>          \"node_modules\",\r\n>          \"actions\",\r\n>          \"components\",\r\n>          ...\r\n>       ],\r\n>       \"alias\":{\r\n>          \"commonActions\":\"actions\",\r\n>          \"apiActions\":\"actions/api\",,\r\n>          \"customFormActions\":\"actions/formCustom\",\r\n>          \"components\":\"components\",\r\n>          \"formComponents\":\"components/form\",\r\n>          ...\r\n>       },\r\n>       \"extensions\": ['', '.json', '.js', '.jsx']\r\n>    },\r\n>    ...\r\n> }\r\n> ```\r\n> P.S. We finished up in approach from first comment: create separate test config with absolute paths for aliases. That works for us but may confuse other users of this library\r\n\r\nAt the moment if your relative paths are not prefixed with `./`, it won't work because of [those lines](https://github.com/trayio/babel-plugin-webpack-alias/blob/master/src/index.js#L94-L101) brought for private modules support."}}
{"actor":{"display_login":"adriantoine"}}