{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/3617","repository_url":"https://api.github.com/repos/jhipster/generator-jhipster","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/3617/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/3617/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/3617/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/3617","id":155669723,"number":3617,"title":"Production build excludes images from bower components","user":{"login":"gmarziou","id":361007,"avatar_url":"https://avatars.githubusercontent.com/u/361007?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarziou","html_url":"https://github.com/gmarziou","followers_url":"https://api.github.com/users/gmarziou/followers","following_url":"https://api.github.com/users/gmarziou/following{/other_user}","gists_url":"https://api.github.com/users/gmarziou/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarziou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarziou/subscriptions","organizations_url":"https://api.github.com/users/gmarziou/orgs","repos_url":"https://api.github.com/users/gmarziou/repos","events_url":"https://api.github.com/users/gmarziou/events{/privacy}","received_events_url":"https://api.github.com/users/gmarziou/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jhipster/generator-jhipster/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-05-19T07:22:01Z","updated_at":"2016-05-26T07:44:18Z","closed_at":null,"body":"##### **Overview of the issue**\r\n\r\nImages distributed as part of a bower component like leaflet are not included in the production war.\r\nThis was working in 2.x when `bower_components` folder was always included before change #2945 was made.\r\n\r\nIn the case of leaflet, these images are well declared in their [bower.json](https://github.com/Leaflet/Leaflet/blob/v0.7.7/bower.json) and so could be imported automatically similarly to fonts or css.\r\n\r\n##### **JHipster Version(s)** \r\n\r\nJHipster 3.3.0\r\nIt's a regression from JHipster 2.x\r\n\r\n##### **Reproduce the error** \r\n\r\nGenerate a simple monolith app add leaflet to bower components.\r\nRun a production build: `mvn -Pprod package`\r\n\r\nLook at the content of the war file, it does not include the images that are in `bower_components/leaflet/dist` are not included.\r\n\r\nHere is a repo that reproduces the problem:\r\n\r\nhttps://github.com/gmarziou/bower-images-excluded\r\n\r\n##### **Suggest a Fix** \r\n\r\nThere could be 2 approaches:\r\n\r\n1. minifying and versioning images from `bower_components`, replacing refs to original images in all html, js and css\r\n2. Include only the main parts of bower_components\r\n\r\nFor leaflet, I could not get the first approach to work because there are no simple reference to image names in  js or css files. Second approach works because there is a leaflet variable to specify the folder where to find images.\r\n\r\n@erikkemperman do you have a suggestion?\r\n"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/221800437","html_url":"https://github.com/jhipster/generator-jhipster/issues/3617#issuecomment-221800437","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/3617","id":221800437,"user":{"login":"gmarziou","id":361007,"avatar_url":"https://avatars.githubusercontent.com/u/361007?v=3","gravatar_id":"","url":"https://api.github.com/users/gmarziou","html_url":"https://github.com/gmarziou","followers_url":"https://api.github.com/users/gmarziou/followers","following_url":"https://api.github.com/users/gmarziou/following{/other_user}","gists_url":"https://api.github.com/users/gmarziou/gists{/gist_id}","starred_url":"https://api.github.com/users/gmarziou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmarziou/subscriptions","organizations_url":"https://api.github.com/users/gmarziou/orgs","repos_url":"https://api.github.com/users/gmarziou/repos","events_url":"https://api.github.com/users/gmarziou/events{/privacy}","received_events_url":"https://api.github.com/users/gmarziou/received_events","type":"User","site_admin":false},"created_at":"2016-05-26T07:44:18Z","updated_at":"2016-05-26T07:44:18Z","body":"The angularjs-slider CSS does not use any image, so I would say it's related to the minification process only."}}
{"actor":{"display_login":"gmarziou"}}