{"action":"opened","issue":{"url":"https://api.github.com/repos/zont/gulp-usemin/issues/182","repository_url":"https://api.github.com/repos/zont/gulp-usemin","labels_url":"https://api.github.com/repos/zont/gulp-usemin/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/zont/gulp-usemin/issues/182/comments","events_url":"https://api.github.com/repos/zont/gulp-usemin/issues/182/events","html_url":"https://github.com/zont/gulp-usemin/issues/182","id":185596617,"number":182,"title":"usemin appends <link> for CSS sourcemap file","user":{"login":"airdrummingfool","id":631249,"avatar_url":"https://avatars.githubusercontent.com/u/631249?v=3","gravatar_id":"","url":"https://api.github.com/users/airdrummingfool","html_url":"https://github.com/airdrummingfool","followers_url":"https://api.github.com/users/airdrummingfool/followers","following_url":"https://api.github.com/users/airdrummingfool/following{/other_user}","gists_url":"https://api.github.com/users/airdrummingfool/gists{/gist_id}","starred_url":"https://api.github.com/users/airdrummingfool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airdrummingfool/subscriptions","organizations_url":"https://api.github.com/users/airdrummingfool/orgs","repos_url":"https://api.github.com/users/airdrummingfool/repos","events_url":"https://api.github.com/users/airdrummingfool/events{/privacy}","received_events_url":"https://api.github.com/users/airdrummingfool/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-27T07:49:21Z","updated_at":"2016-10-27T07:49:21Z","closed_at":null,"body":"Using usemin with sourcemaps, I get an extra `<link>` entry in my HTML build that points to the `.css.map` file. This causes Chrome to load the map file as CSS, and throw up the following error:\r\n```\r\nResource interpreted as Stylesheet but transferred with MIME type application/json: \"http://localhost:3000/styles/main.css.map\".\r\n```\r\n\r\nSource HTML:\r\n``` html\r\n<!-- build:less styles/main.css -->\r\n<link rel=\"stylesheet\" href=\"styles/less/custom.less\" media=\"all\">\r\n<!-- endbuild -->\r\n```\r\n\r\nOutput HTML:\r\n``` html\r\n<link rel=\"stylesheet\" href=\"styles/main.css.map\" media=\"all\"/>\r\n<link rel=\"stylesheet\" href=\"styles/main.css\" media=\"all\"/>\r\n```\r\nNotice the extra sourcemap CSS `<link>` tag, which shouldn't be there. I'm also using usemin to compile javascript files, and the js sourcemap is not included in the HTML output.\r\n\r\nRelevant SO question (not mine): http://stackoverflow.com/questions/36068780/how-to-stop-sourcemaps-usemin-from-appending-css-map-link-tag-to-output\r\n\r\nThe accepted answer points out: \r\n> gulp-usemin [explicitly makes sure](https://github.com/zont/gulp-usemin/blob/a220139afe2cc16539e585692f847e5aea66f3ae/lib/htmlBuilder.js#L61) to only create `<script>` tags for files that end in `.js`. There is [no such check](https://github.com/zont/gulp-usemin/blob/a220139afe2cc16539e585692f847e5aea66f3ae/lib/htmlBuilder.js#L69) for CSS.\"\r\n\r\nWould you accept a PR to add a file extension check for `.css`, similar to the JS check?\r\n"}}
{"actor":{"display_login":"airdrummingfool"}}