{"action":"created","issue":{"url":"https://api.github.com/repos/survivejs/webpack-book/issues/268","repository_url":"https://api.github.com/repos/survivejs/webpack-book","labels_url":"https://api.github.com/repos/survivejs/webpack-book/issues/268/labels{/name}","comments_url":"https://api.github.com/repos/survivejs/webpack-book/issues/268/comments","events_url":"https://api.github.com/repos/survivejs/webpack-book/issues/268/events","html_url":"https://github.com/survivejs/webpack-book/issues/268","id":227214389,"number":268,"title":"Autoprefixer not working with code in book","user":{"login":"ryanhamley","id":4523080,"avatar_url":"https://avatars2.githubusercontent.com/u/4523080?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanhamley","html_url":"https://github.com/ryanhamley","followers_url":"https://api.github.com/users/ryanhamley/followers","following_url":"https://api.github.com/users/ryanhamley/following{/other_user}","gists_url":"https://api.github.com/users/ryanhamley/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanhamley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanhamley/subscriptions","organizations_url":"https://api.github.com/users/ryanhamley/orgs","repos_url":"https://api.github.com/users/ryanhamley/repos","events_url":"https://api.github.com/users/ryanhamley/events{/privacy}","received_events_url":"https://api.github.com/users/ryanhamley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-09T00:37:18Z","updated_at":"2017-05-09T19:20:56Z","closed_at":null,"body":"I don't know if something has changed recently or if I'm making a very silly mistake, but I cannot get Autoprefixer working to save my life.\r\n\r\nI'm using Node 6.9.2, Webpack 2.2.1, Autoprefixer 7.0.1, PostCSS 5.2.17 and PostCSS-Loader 2.0.1.\r\n\r\nIn `webpack.parts.js`:\r\n\r\n```\r\nexports.autoprefix = () => {\r\n  console.log('autoprefix');\r\n  return {\r\n    loader: 'postcss-loader',\r\n    options: {\r\n      plugins: () => ([\r\n        require('autoprefixer'),\r\n      ]),\r\n    },\r\n  };\r\n};\r\n```\r\n\r\nI modified the code from the book so I could log in the function to make sure it's being executed and it is. I had initially copied and pasted the code directly from the book and that did not work either.\r\n\r\nIn `webpack.config.js`:\r\n\r\n```\r\nconst productionConfig = merge([\r\n  parts.extractCSS({\r\n    use: ['css-loader', parts.autoprefix()],\r\n  }),\r\n]);\r\n```\r\n\r\nMy `main.css`:\r\n\r\n```\r\nbody {\r\n  background: cornsilk;\r\n  display: flex;\r\n}\r\n```\r\n\r\nRunning `npm run build` works fine. There's no errors, the CLI output looks fine and the page loads as expected. But `app.css` in the build folder is exactly the same as `main.css` with no prefixes applied. I've tried with some other CSS properties such as `display: grid` and `background: linear-gradient(...)` which did not get prefixed either.\r\n\r\nAny help would be appreciated."},"comment":{"url":"https://api.github.com/repos/survivejs/webpack-book/issues/comments/300273956","html_url":"https://github.com/survivejs/webpack-book/issues/268#issuecomment-300273956","issue_url":"https://api.github.com/repos/survivejs/webpack-book/issues/268","id":300273956,"user":{"login":"bebraw","id":166921,"avatar_url":"https://avatars3.githubusercontent.com/u/166921?v=3","gravatar_id":"","url":"https://api.github.com/users/bebraw","html_url":"https://github.com/bebraw","followers_url":"https://api.github.com/users/bebraw/followers","following_url":"https://api.github.com/users/bebraw/following{/other_user}","gists_url":"https://api.github.com/users/bebraw/gists{/gist_id}","starred_url":"https://api.github.com/users/bebraw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bebraw/subscriptions","organizations_url":"https://api.github.com/users/bebraw/orgs","repos_url":"https://api.github.com/users/bebraw/repos","events_url":"https://api.github.com/users/bebraw/events{/privacy}","received_events_url":"https://api.github.com/users/bebraw/received_events","type":"User","site_admin":false},"created_at":"2017-05-09T19:20:56Z","updated_at":"2017-05-09T19:20:56Z","body":"No worries. I have to look into this in greater detail to see if it's a bug or what. The signature needs to be fixed but there could be something else going on. Thanks for opening the issue. 👍 "}}
{"actor":{"display_login":"bebraw"}}