{"action":"created","issue":{"url":"https://api.github.com/repos/wmonk/create-react-app-typescript/issues/203","repository_url":"https://api.github.com/repos/wmonk/create-react-app-typescript","labels_url":"https://api.github.com/repos/wmonk/create-react-app-typescript/issues/203/labels{/name}","comments_url":"https://api.github.com/repos/wmonk/create-react-app-typescript/issues/203/comments","events_url":"https://api.github.com/repos/wmonk/create-react-app-typescript/issues/203/events","html_url":"https://github.com/wmonk/create-react-app-typescript/issues/203","id":279726930,"number":203,"title":"Support for TypeScripts 'paths' option","user":{"login":"the-mike","id":1049832,"avatar_url":"https://avatars1.githubusercontent.com/u/1049832?v=4","gravatar_id":"","url":"https://api.github.com/users/the-mike","html_url":"https://github.com/the-mike","followers_url":"https://api.github.com/users/the-mike/followers","following_url":"https://api.github.com/users/the-mike/following{/other_user}","gists_url":"https://api.github.com/users/the-mike/gists{/gist_id}","starred_url":"https://api.github.com/users/the-mike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-mike/subscriptions","organizations_url":"https://api.github.com/users/the-mike/orgs","repos_url":"https://api.github.com/users/the-mike/repos","events_url":"https://api.github.com/users/the-mike/events{/privacy}","received_events_url":"https://api.github.com/users/the-mike/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-12-06T11:58:02Z","updated_at":"2018-04-15T22:31:01Z","closed_at":null,"author_association":"NONE","body":"I'm trying to implement alias for importing modules from root of my project. According to typescripts docs it can be done by adding following configuration to 'tsconfig.json' file\r\n```json\r\n    \"baseUrl\": \"./\",\r\n    \"paths\": {\r\n      \"~/*\": [\"./src/*\"]\r\n```\r\nI get no Typescript compile error, but error from webpack i.e.\r\nFailed to compile.\r\n\r\n./src/App.tsx\r\nModule not found: Can't resolve '~/components/forms' in '/Users/mike/dev/js/react-ts/src'\r\n\r\nMy env:\r\nmacOS 12.12.3\r\nnode v. 6.10\r\ncreate-react-app 1.4.3\r\nreact-scripts-ts 2.8.0\r\n\r\nIt seems to be known issue and was resolved in awesome-typescript-loader using plugin https://github.com/dividab/tsconfig-paths-webpack-plugin. \r\nFor now I change my typescript config to \r\n```json\r\n    \"paths\": {\r\n      \"src/*\": [\"./src/*\"]\r\n    },\r\n```\r\nand added .env file with\r\nNODE_PATH=.\r\nSeems that it fixed global imports inside my project but it not very flexible."},"comment":{"url":"https://api.github.com/repos/wmonk/create-react-app-typescript/issues/comments/381443260","html_url":"https://github.com/wmonk/create-react-app-typescript/issues/203#issuecomment-381443260","issue_url":"https://api.github.com/repos/wmonk/create-react-app-typescript/issues/203","id":381443260,"user":{"login":"hassankhan","id":1781985,"avatar_url":"https://avatars2.githubusercontent.com/u/1781985?v=4","gravatar_id":"","url":"https://api.github.com/users/hassankhan","html_url":"https://github.com/hassankhan","followers_url":"https://api.github.com/users/hassankhan/followers","following_url":"https://api.github.com/users/hassankhan/following{/other_user}","gists_url":"https://api.github.com/users/hassankhan/gists{/gist_id}","starred_url":"https://api.github.com/users/hassankhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hassankhan/subscriptions","organizations_url":"https://api.github.com/users/hassankhan/orgs","repos_url":"https://api.github.com/users/hassankhan/repos","events_url":"https://api.github.com/users/hassankhan/events{/privacy}","received_events_url":"https://api.github.com/users/hassankhan/received_events","type":"User","site_admin":false},"created_at":"2018-04-15T22:31:01Z","updated_at":"2018-04-15T22:31:01Z","author_association":"NONE","body":"Oddly, for me the same configuration as @kuzvac leads to Jest getting stuck at `Determining test suites to run...`."}}
{"actor":{"display_login":"hassankhan"}}