{"action":"created","issue":{"url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/205","repository_url":"https://api.github.com/repos/shakacode/bootstrap-loader","labels_url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/205/comments","events_url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/205/events","html_url":"https://github.com/shakacode/bootstrap-loader/pull/205","id":189502608,"number":205,"title":"Fix #201: Enforce -loader suffix when processing loaders to handle old & new Webpack compatibility","user":{"login":"kevinzwhuang","id":7256178,"avatar_url":"https://avatars.githubusercontent.com/u/7256178?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinzwhuang","html_url":"https://github.com/kevinzwhuang","followers_url":"https://api.github.com/users/kevinzwhuang/followers","following_url":"https://api.github.com/users/kevinzwhuang/following{/other_user}","gists_url":"https://api.github.com/users/kevinzwhuang/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinzwhuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinzwhuang/subscriptions","organizations_url":"https://api.github.com/users/kevinzwhuang/orgs","repos_url":"https://api.github.com/users/kevinzwhuang/repos","events_url":"https://api.github.com/users/kevinzwhuang/events{/privacy}","received_events_url":"https://api.github.com/users/kevinzwhuang/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-11-15T20:49:00Z","updated_at":"2016-11-18T06:32:14Z","closed_at":"2016-11-18T05:51:13Z","pull_request":{"url":"https://api.github.com/repos/shakacode/bootstrap-loader/pulls/205","html_url":"https://github.com/shakacode/bootstrap-loader/pull/205","diff_url":"https://github.com/shakacode/bootstrap-loader/pull/205.diff","patch_url":"https://github.com/shakacode/bootstrap-loader/pull/205.patch"},"body":"Summary:\r\n-----\r\n\r\nThe latest build of Webpack (v2.1.0-beta.26) requires loaders be explicitly stated with the `-loader` suffix, thus causing bootstrap-loader to no longer be compatible due to use of shorthand loader names. \r\n\r\nThis PR fixes #201. \r\n\r\nFix Proposed:\r\n-----\r\n\r\nThis PR handles both cases, with or without `-loader`, to keep compatibility with old webpack users that omit the `-loader` suffix. To do so, I'm proposing the following changes:\r\n\r\n- [x] Style loaders coming from `.bootstraprc` are checked for a `-loader` suffix using regex to find for compatible style loaders.\r\n- [x] If the style loader coming from `.bootstraprc` is missing the `-loader` suffix, it replaces the short name with the name + `-loader`. Otherwise, it returns the original loader name if it passes the suffix test.\r\n- [x] For `buildExtractStyleLoaders`, the fallback loader now comes with the `-loader` suffix. Kudos to @silveryiris for this original solution. see https://github.com/shakacode/bootstrap-loader/issues/201#issue-189030570\r\n\r\nTest Plan:\r\n----\r\n\r\n`buildExtractStylesLoader.test.js` and `processStyleLoaders.test.js` have both been updated to reflect these new changes and test correctly for the new `-loader` suffix. This should pass the requirement in Webpack v2.1.0-beta.26. \r\n\r\nSome additional configuration work will be required to bring the examples up to par with beta.26, however to keep the scope of this PR controlled to the functionality of `-loader` suffix handling, that work is not included in this PR. I can follow up with another PR for proper beta.26 configuration for the examples.\r\n\r\n---\r\ncc: @justin808\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/shakacode/bootstrap-loader/205)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/comments/261459470","html_url":"https://github.com/shakacode/bootstrap-loader/pull/205#issuecomment-261459470","issue_url":"https://api.github.com/repos/shakacode/bootstrap-loader/issues/205","id":261459470,"user":{"login":"kevinzwhuang","id":7256178,"avatar_url":"https://avatars.githubusercontent.com/u/7256178?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinzwhuang","html_url":"https://github.com/kevinzwhuang","followers_url":"https://api.github.com/users/kevinzwhuang/followers","following_url":"https://api.github.com/users/kevinzwhuang/following{/other_user}","gists_url":"https://api.github.com/users/kevinzwhuang/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinzwhuang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinzwhuang/subscriptions","organizations_url":"https://api.github.com/users/kevinzwhuang/orgs","repos_url":"https://api.github.com/users/kevinzwhuang/repos","events_url":"https://api.github.com/users/kevinzwhuang/events{/privacy}","received_events_url":"https://api.github.com/users/kevinzwhuang/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T06:32:14Z","updated_at":"2016-11-18T06:32:14Z","body":"Great, thanks @justin808!"}}
{"actor":{"display_login":"kevinzwhuang"}}