{"action":"created","issue":{"url":"https://api.github.com/repos/ceolter/ag-grid-ng2/issues/108","repository_url":"https://api.github.com/repos/ceolter/ag-grid-ng2","labels_url":"https://api.github.com/repos/ceolter/ag-grid-ng2/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/ceolter/ag-grid-ng2/issues/108/comments","events_url":"https://api.github.com/repos/ceolter/ag-grid-ng2/issues/108/events","html_url":"https://github.com/ceolter/ag-grid-ng2/issues/108","id":197901602,"number":108,"title":"Error: 'main.ts' is not under 'rootDir'. 'rootDir' is expected to contain all source files.","user":{"login":"evan-carey","id":4581913,"avatar_url":"https://avatars.githubusercontent.com/u/4581913?v=3","gravatar_id":"","url":"https://api.github.com/users/evan-carey","html_url":"https://github.com/evan-carey","followers_url":"https://api.github.com/users/evan-carey/followers","following_url":"https://api.github.com/users/evan-carey/following{/other_user}","gists_url":"https://api.github.com/users/evan-carey/gists{/gist_id}","starred_url":"https://api.github.com/users/evan-carey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evan-carey/subscriptions","organizations_url":"https://api.github.com/users/evan-carey/orgs","repos_url":"https://api.github.com/users/evan-carey/repos","events_url":"https://api.github.com/users/evan-carey/events{/privacy}","received_events_url":"https://api.github.com/users/evan-carey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-28T19:10:40Z","updated_at":"2016-12-31T12:53:47Z","closed_at":null,"body":"Building with webpack 2.2.0-rc.2 and awesome-typescript-loader 3.0.0-beta.17, I'm getting the error:\r\n```\r\n[at-loader] File '../node_modules/ag-grid-ng2/main.ts' is not under 'rootDir' '../src'. 'rootDir' is expected to contain all source files.\r\n```\r\nThis is a very similar issue that was resolved by removing *.ts files when publishing to npm: \r\n[https://github.com/sean-perkins/nativescript-opentok/issues/8](https://github.com/sean-perkins/nativescript-opentok/issues/8)\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/ceolter/ag-grid-ng2/issues/comments/269863800","html_url":"https://github.com/ceolter/ag-grid-ng2/issues/108#issuecomment-269863800","issue_url":"https://api.github.com/repos/ceolter/ag-grid-ng2/issues/108","id":269863800,"user":{"login":"dmarginian","id":12652143,"avatar_url":"https://avatars.githubusercontent.com/u/12652143?v=3","gravatar_id":"","url":"https://api.github.com/users/dmarginian","html_url":"https://github.com/dmarginian","followers_url":"https://api.github.com/users/dmarginian/followers","following_url":"https://api.github.com/users/dmarginian/following{/other_user}","gists_url":"https://api.github.com/users/dmarginian/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarginian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarginian/subscriptions","organizations_url":"https://api.github.com/users/dmarginian/orgs","repos_url":"https://api.github.com/users/dmarginian/repos","events_url":"https://api.github.com/users/dmarginian/events{/privacy}","received_events_url":"https://api.github.com/users/dmarginian/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T12:53:47Z","updated_at":"2016-12-31T12:53:47Z","body":"Hi Sean, I am not using webpack.  I have a small table component that I build with ngc and consume from applications.  When I build my component I end up with the ngc output directly under dist (per my config) where it should be, but the compiled js is under dist/src (related TypeScript issue - https://github.com/Microsoft/TypeScript/pull/2772).  Per the description of the TypeScript issue the rootDir flag can be added to control this, if I add that I get a failure per @evan-carey.  \r\n\r\nThe reason for this is that main.ts has not been compiled (main.js) in the ag-grid-ng2 distribution.  So when the TypeScript compiler sees:\r\n\r\n`\r\nimport {AgGridModule} from \"ag-grid-ng2/main\";\r\n`\r\n\r\nit attempts to compile it.  If I have the rootDir option set it will blow up because ag-grid-ng2's main.ts is outside of my component's source directory.  If I leave the rootDir flag out tsc adds the src/ directory (dist/src) which causes my component to have an invalid distribution.  I attempted to work-around this by copying the js/js.maps from dist/src/ to dist which fixes my distribution but results in non-working source maps due to relative links embedded within them.\r\n\r\nI don't have a problem with multiple tsconfig files but I am unsure of why the ag-grid-ng2 barrel (main.ts) has been excluded from compilation in tsconfig-src.  This results in this file never being compiled which doesn't seem correct.\r\n\r\nMy tsconfig.jsons:\r\n\r\n`{\r\n  \"compilerOptions\": {\r\n    \"target\": \"es5\",\r\n    \"module\": \"commonjs\",\r\n    \"moduleResolution\": \"node\",\r\n    \"sourceMap\": true,\r\n    \"emitDecoratorMetadata\": true,\r\n    \"experimentalDecorators\": true,\r\n    \"removeComments\": false,\r\n    \"noImplicitAny\": false,\r\n    \"suppressImplicitAnyIndexErrors\": true,\r\n    \"types\": [],\r\n    \"declaration\": true,\r\n    \"outDir\": \"../dist\"\r\n  },\r\n  \"files\": [\r\n    \"table.module.ts\",\r\n    \"index.ts\",\r\n    \"typings/index.d.ts\"\r\n  ],\r\n  \"angularCompilerOptions\": {\r\n    \"genDir\": \"../dist\"\r\n  }\r\n}\r\n`\r\n\r\n\r\n"}}
{"actor":{"display_login":"dmarginian"}}