{"action":"created","issue":{"url":"https://api.github.com/repos/webpack-contrib/purifycss-webpack/issues/111","repository_url":"https://api.github.com/repos/webpack-contrib/purifycss-webpack","labels_url":"https://api.github.com/repos/webpack-contrib/purifycss-webpack/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/webpack-contrib/purifycss-webpack/issues/111/comments","events_url":"https://api.github.com/repos/webpack-contrib/purifycss-webpack/issues/111/events","html_url":"https://github.com/webpack-contrib/purifycss-webpack/issues/111","id":231818646,"number":111,"title":"Styles imported in an async split bundle are incorrectly filtered out","user":{"login":"vitosamson","id":6261065,"avatar_url":"https://avatars3.githubusercontent.com/u/6261065?v=3","gravatar_id":"","url":"https://api.github.com/users/vitosamson","html_url":"https://github.com/vitosamson","followers_url":"https://api.github.com/users/vitosamson/followers","following_url":"https://api.github.com/users/vitosamson/following{/other_user}","gists_url":"https://api.github.com/users/vitosamson/gists{/gist_id}","starred_url":"https://api.github.com/users/vitosamson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitosamson/subscriptions","organizations_url":"https://api.github.com/users/vitosamson/orgs","repos_url":"https://api.github.com/users/vitosamson/repos","events_url":"https://api.github.com/users/vitosamson/events{/privacy}","received_events_url":"https://api.github.com/users/vitosamson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-05-27T18:11:57Z","updated_at":"2017-05-28T16:35:42Z","closed_at":null,"body":"Minimal repro project: https://github.com/vitosamson/purifycss-webpack-repro.\r\n\r\nThere are two entry points: `src/split` and `src/not-split`. Both pull in `src/Child`, but `split` does so via `require.ensure` for async code splitting. `Child` imports `react-select`'s css.\r\n\r\nThe split css bundle for some reason is 3kb smaller than the non-split bundle. One example of a missing css rule is `.Select-arrow-zone`.\r\n\r\nIt's not clear to me why the two entries are being treated differently. Clearly at least some of the css selectors in the split bundle are being picked up, but not all of them.\r\n\r\npurifycss-webpack: 0.7.0\r\nwebpack: 2.6.1\r\nnode: 6.9.1\r\nOS: OSX 10.11.1"},"comment":{"url":"https://api.github.com/repos/webpack-contrib/purifycss-webpack/issues/comments/304525506","html_url":"https://github.com/webpack-contrib/purifycss-webpack/issues/111#issuecomment-304525506","issue_url":"https://api.github.com/repos/webpack-contrib/purifycss-webpack/issues/111","id":304525506,"user":{"login":"vitosamson","id":6261065,"avatar_url":"https://avatars3.githubusercontent.com/u/6261065?v=3","gravatar_id":"","url":"https://api.github.com/users/vitosamson","html_url":"https://github.com/vitosamson","followers_url":"https://api.github.com/users/vitosamson/followers","following_url":"https://api.github.com/users/vitosamson/following{/other_user}","gists_url":"https://api.github.com/users/vitosamson/gists{/gist_id}","starred_url":"https://api.github.com/users/vitosamson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitosamson/subscriptions","organizations_url":"https://api.github.com/users/vitosamson/orgs","repos_url":"https://api.github.com/users/vitosamson/repos","events_url":"https://api.github.com/users/vitosamson/events{/privacy}","received_events_url":"https://api.github.com/users/vitosamson/received_events","type":"User","site_admin":false},"created_at":"2017-05-28T16:35:42Z","updated_at":"2017-05-28T16:35:42Z","body":"After a little digging I've found the following:\r\n\r\n  - `src/Child.js` is never included in `filesToSearch` [here](https://github.com/webpack-contrib/purifycss-webpack/blob/master/src/index.js#L52)\r\n  - this is probably due to `Child` being in a different chunk (it's not in the main chunk's `files`)\r\n  - the `Child` chunk *is* included in `compilation.chunks` [here](https://github.com/webpack-contrib/purifycss-webpack/blob/master/src/index.js#L38), however since ExtractTextPlugin pulls all child chunks css into the main chunk, there are no `assetsToPurify` for it [here](https://github.com/webpack-contrib/purifycss-webpack/blob/master/src/index.js#L40) - the only asset that chunk has is its .js\r\n\r\nI'm not really sure how to work around this. I also can't figure out why the `split` css bundle includes any `react-select` styles at all, rather than dropping all of them since `Child` is never included in the files to search."}}
{"actor":{"display_login":"vitosamson"}}