{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular-cli/issues/12333","repository_url":"https://api.github.com/repos/angular/angular-cli","labels_url":"https://api.github.com/repos/angular/angular-cli/issues/12333/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular-cli/issues/12333/comments","events_url":"https://api.github.com/repos/angular/angular-cli/issues/12333/events","html_url":"https://github.com/angular/angular-cli/issues/12333","id":362382276,"node_id":"MDU6SXNzdWUzNjIzODIyNzY=","number":12333,"title":"Library docs say to build lib --prod but it fails.","user":{"login":"escalonn","id":2515013,"node_id":"MDQ6VXNlcjI1MTUwMTM=","avatar_url":"https://avatars0.githubusercontent.com/u/2515013?v=4","gravatar_id":"","url":"https://api.github.com/users/escalonn","html_url":"https://github.com/escalonn","followers_url":"https://api.github.com/users/escalonn/followers","following_url":"https://api.github.com/users/escalonn/following{/other_user}","gists_url":"https://api.github.com/users/escalonn/gists{/gist_id}","starred_url":"https://api.github.com/users/escalonn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/escalonn/subscriptions","organizations_url":"https://api.github.com/users/escalonn/orgs","repos_url":"https://api.github.com/users/escalonn/repos","events_url":"https://api.github.com/users/escalonn/events{/privacy}","received_events_url":"https://api.github.com/users/escalonn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-20T21:54:20Z","updated_at":"2018-09-21T07:28:26Z","closed_at":"2018-09-21T07:28:26Z","author_association":"NONE","body":"### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report\r\n- [ ] feature request\r\n```\r\n\r\n### Command (mark with an `x`)\r\n```\r\n- [ ] new\r\n- [x] build\r\n- [ ] serve\r\n- [ ] test\r\n- [ ] e2e\r\n- [ ] generate\r\n- [ ] add\r\n- [ ] update\r\n- [ ] lint\r\n- [ ] xi18n\r\n- [ ] run\r\n- [ ] config\r\n- [ ] help\r\n- [ ] version\r\n- [x] doc\r\n```\r\n\r\n### Versions\r\n```\r\n$ node --version\r\nv8.11.2\r\n```\r\n```\r\nnpm --version\r\n6.4.1\r\n```\r\n```\r\n$ ng --version\r\n\r\n     _                      _                 ____ _     ___\r\n    / \\   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|\r\n   / △ \\ | '_ \\ / _` | | | | |/ _` | '__|   | |   | |    | |\r\n  / ___ \\| | | | (_| | |_| | | (_| | |      | |___| |___ | |\r\n /_/   \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_|       \\____|_____|___|\r\n                |___/\r\n\r\n\r\nAngular CLI: 6.2.3\r\nNode: 8.11.2\r\nOS: win32 x64\r\nAngular: 6.1.8\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\nPackage                            Version\r\n------------------------------------------------------------\r\n@angular-devkit/architect          0.8.3\r\n@angular-devkit/build-angular      0.8.3\r\n@angular-devkit/build-ng-packagr   0.8.3\r\n@angular-devkit/build-optimizer    0.8.3\r\n@angular-devkit/build-webpack      0.8.3\r\n@angular-devkit/core               0.8.3\r\n@angular-devkit/schematics         0.8.3\r\n@angular/cli                       6.2.3\r\n@ngtools/json-schema               1.1.0\r\n@ngtools/webpack                   6.2.3\r\n@schematics/angular                0.8.3\r\n@schematics/update                 0.8.3\r\nng-packagr                         4.2.0\r\nrxjs                               6.2.2\r\ntypescript                         2.9.2\r\nwebpack                            4.19.1\r\n```\r\nWindows 10.\r\n\r\n### Repro steps\r\n1. `ng new my-app`\r\n1. `cd my-app`\r\n1. `ng generate library my-lib`\r\n1. `ng build my-lib --prod`\r\n\r\n### The log given by the failure\r\n```\r\nConfiguration 'production' could not be found in project 'my-lib'.\r\nError: Configuration 'production' could not be found in project 'my-lib'.\r\n    at Architect.getBuilderConfiguration (C:\\code\\my-app\\node_modules\\@angular-devkit\\architect\\src\\architect.js:102:23)\r\n    at MergeMapSubscriber._loadWorkspaceAndArchitect.pipe.operators_1.concatMap [as project] (C:\\code\\my-app\\node_modules\\@angular\\cli\\models\\architect-command.js:70:55)\r\n    at MergeMapSubscriber._tryNext (C:\\code\\my-app\\node_modules\\rxjs\\internal\\operators\\mergeMap.js:65:27)\r\n    at MergeMapSubscriber._next (C:\\code\\my-app\\node_modules\\rxjs\\internal\\operators\\mergeMap.js:55:18)\r\n    at MergeMapSubscriber.Subscriber.next (C:\\code\\my-app\\node_modules\\rxjs\\internal\\Subscriber.js:64:18)\r\n    at TapSubscriber._next (C:\\code\\my-app\\node_modules\\rxjs\\internal\\operators\\tap.js:62:26)\r\n    at TapSubscriber.Subscriber.next (C:\\code\\my-app\\node_modules\\rxjs\\internal\\Subscriber.js:64:18)\r\n    at MergeMapSubscriber.notifyNext (C:\\code\\my-app\\node_modules\\rxjs\\internal\\operators\\mergeMap.js:84:26)\r\n    at InnerSubscriber._next (C:\\code\\my-app\\node_modules\\rxjs\\internal\\InnerSubscriber.js:25:21)\r\n    at InnerSubscriber.Subscriber.next (C:\\code\\my-app\\node_modules\\rxjs\\internal\\Subscriber.js:64:18)\r\n```\r\n\r\n### Desired functionality\r\nAccording to [create library story](https://github.com/angular/angular-cli/wiki/stories-create-library) in wiki documentation, to publish my library I should run `ng build my-lib --prod`. (\"The `--prod` flag should be used when building to publish because it will completely clean the build directory for the library beforehand, removing old code leftover code from previous versions.\")\r\n\r\nAs far as I can tell, `generate library` has since been updated to not add a production configuration for the project, and to just make the regular build clear `dist/my-lib`.\r\n\r\nSo the documentation should be updated to reflect this.\r\n\r\nBut I am not an Angular expert and I would like to be sure whether when an application which includes the library is built with `--prod`, the typical benefits of it (AOT, etc.) are still provided to the library code and not just the application code.\r\n\r\n### Mention any other details that might be useful\r\nPossibly #10710 related."},"comment":{"url":"https://api.github.com/repos/angular/angular-cli/issues/comments/423440825","html_url":"https://github.com/angular/angular-cli/issues/12333#issuecomment-423440825","issue_url":"https://api.github.com/repos/angular/angular-cli/issues/12333","id":423440825,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzQ0MDgyNQ==","user":{"login":"alan-agius4","id":17563226,"node_id":"MDQ6VXNlcjE3NTYzMjI2","avatar_url":"https://avatars3.githubusercontent.com/u/17563226?v=4","gravatar_id":"","url":"https://api.github.com/users/alan-agius4","html_url":"https://github.com/alan-agius4","followers_url":"https://api.github.com/users/alan-agius4/followers","following_url":"https://api.github.com/users/alan-agius4/following{/other_user}","gists_url":"https://api.github.com/users/alan-agius4/gists{/gist_id}","starred_url":"https://api.github.com/users/alan-agius4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alan-agius4/subscriptions","organizations_url":"https://api.github.com/users/alan-agius4/orgs","repos_url":"https://api.github.com/users/alan-agius4/repos","events_url":"https://api.github.com/users/alan-agius4/events{/privacy}","received_events_url":"https://api.github.com/users/alan-agius4/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T07:28:26Z","updated_at":"2018-09-21T07:28:26Z","author_association":"COLLABORATOR","body":"Duplicate of 12290"}}
{"actor":{"display_login":"alan-agius4"}}