{"action":"closed","issue":{"url":"https://api.github.com/repos/enonic/lib-admin-ui/issues/305","repository_url":"https://api.github.com/repos/enonic/lib-admin-ui","labels_url":"https://api.github.com/repos/enonic/lib-admin-ui/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/enonic/lib-admin-ui/issues/305/comments","events_url":"https://api.github.com/repos/enonic/lib-admin-ui/issues/305/events","html_url":"https://github.com/enonic/lib-admin-ui/issues/305","id":290483256,"number":305,"title":"Optimize the production build","user":{"login":"alansemenov","id":11612490,"avatar_url":"https://avatars1.githubusercontent.com/u/11612490?v=4","gravatar_id":"","url":"https://api.github.com/users/alansemenov","html_url":"https://github.com/alansemenov","followers_url":"https://api.github.com/users/alansemenov/followers","following_url":"https://api.github.com/users/alansemenov/following{/other_user}","gists_url":"https://api.github.com/users/alansemenov/gists{/gist_id}","starred_url":"https://api.github.com/users/alansemenov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alansemenov/subscriptions","organizations_url":"https://api.github.com/users/alansemenov/orgs","repos_url":"https://api.github.com/users/alansemenov/repos","events_url":"https://api.github.com/users/alansemenov/events{/privacy}","received_events_url":"https://api.github.com/users/alansemenov/received_events","type":"User","site_admin":false},"labels":[{"id":702291666,"url":"https://api.github.com/repos/enonic/lib-admin-ui/labels/Improvement","name":"Improvement","color":"0e8a16","default":false},{"id":684792207,"url":"https://api.github.com/repos/enonic/lib-admin-ui/labels/To%20Be%20Discussed","name":"To Be Discussed","color":"d93f0b","default":false}],"state":"closed","locked":false,"assignee":{"login":"edloidas","id":1847621,"avatar_url":"https://avatars3.githubusercontent.com/u/1847621?v=4","gravatar_id":"","url":"https://api.github.com/users/edloidas","html_url":"https://github.com/edloidas","followers_url":"https://api.github.com/users/edloidas/followers","following_url":"https://api.github.com/users/edloidas/following{/other_user}","gists_url":"https://api.github.com/users/edloidas/gists{/gist_id}","starred_url":"https://api.github.com/users/edloidas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edloidas/subscriptions","organizations_url":"https://api.github.com/users/edloidas/orgs","repos_url":"https://api.github.com/users/edloidas/repos","events_url":"https://api.github.com/users/edloidas/events{/privacy}","received_events_url":"https://api.github.com/users/edloidas/received_events","type":"User","site_admin":false},"assignees":[{"login":"edloidas","id":1847621,"avatar_url":"https://avatars3.githubusercontent.com/u/1847621?v=4","gravatar_id":"","url":"https://api.github.com/users/edloidas","html_url":"https://github.com/edloidas","followers_url":"https://api.github.com/users/edloidas/followers","following_url":"https://api.github.com/users/edloidas/following{/other_user}","gists_url":"https://api.github.com/users/edloidas/gists{/gist_id}","starred_url":"https://api.github.com/users/edloidas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edloidas/subscriptions","organizations_url":"https://api.github.com/users/edloidas/orgs","repos_url":"https://api.github.com/users/edloidas/repos","events_url":"https://api.github.com/users/edloidas/events{/privacy}","received_events_url":"https://api.github.com/users/edloidas/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-01-22T14:26:58Z","updated_at":"2018-03-06T12:21:38Z","closed_at":"2018-03-06T12:21:38Z","author_association":"OWNER","body":"**Problem:**\r\nlib-admin-ui jar file is now shipped with the entire source code, both ours and of all 3rd-party libs that we are using. This is unnecessary - if I, as an external developer, want to reference the API then I only need built/compressed files (all.css, all.js etc.) and not the sources. The only reason for having sources of lib-admin-ui in an app is in development mode in order to debug in a browser.\r\n\r\nFor example, app-main is now fully decoupled from lib-admin-ui except for one reference to the API:\r\n```Javascript\r\n<script type=\"text/javascript\" src=\"/admin/tool/com.enonic.xp.app.main/home/_/asset/com.enonic.xp.app.main:1516622075/admin/common/js/_all.js\"></script>\r\n```\r\nHowever, there is no way to include only this one file as a dependency, I have to include the entire lib-admin-ui (with all the sources, fonts, images etc.). As a result, jar file of xp-main grows from 2,5 Mb to 7,5 Mb.\r\n\r\n*Suggested solution*:\r\nSupport two modes when building lib-admin-ui: development and production. Development will be what we have now - jar will include all the sources, fonts, images, libraries etc. Production mode will only contain built css, js and .d.ts files - the minimum that is needed to be referenced from an external app.\r\n\r\nTo be discussed with @tsi and @edloidas"}}
{"actor":{"display_login":"alansemenov"}}