{"action":"created","issue":{"url":"https://api.github.com/repos/webpack-contrib/mini-css-extract-plugin/issues/429","repository_url":"https://api.github.com/repos/webpack-contrib/mini-css-extract-plugin","labels_url":"https://api.github.com/repos/webpack-contrib/mini-css-extract-plugin/issues/429/labels{/name}","comments_url":"https://api.github.com/repos/webpack-contrib/mini-css-extract-plugin/issues/429/comments","events_url":"https://api.github.com/repos/webpack-contrib/mini-css-extract-plugin/issues/429/events","html_url":"https://github.com/webpack-contrib/mini-css-extract-plugin/issues/429","id":470031153,"node_id":"MDU6SXNzdWU0NzAwMzExNTM=","number":429,"title":"Support multiple instances of MiniCssExtractPlugin","user":{"login":"davidli16","id":191351,"node_id":"MDQ6VXNlcjE5MTM1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/191351?v=4","gravatar_id":"","url":"https://api.github.com/users/davidli16","html_url":"https://github.com/davidli16","followers_url":"https://api.github.com/users/davidli16/followers","following_url":"https://api.github.com/users/davidli16/following{/other_user}","gists_url":"https://api.github.com/users/davidli16/gists{/gist_id}","starred_url":"https://api.github.com/users/davidli16/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidli16/subscriptions","organizations_url":"https://api.github.com/users/davidli16/orgs","repos_url":"https://api.github.com/users/davidli16/repos","events_url":"https://api.github.com/users/davidli16/events{/privacy}","received_events_url":"https://api.github.com/users/davidli16/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-07-18T22:58:10Z","updated_at":"2019-07-19T16:12:30Z","closed_at":"2019-07-19T10:59:53Z","author_association":"NONE","body":"- Operating System: All\r\n- Node Version: All\r\n- NPM Version: All\r\n- webpack Version: 4\r\n- mini-css-extract-plugin Version: 0.8.0\r\n\r\n### Feature Proposal\r\n\r\nExtractTextWebpackPlugin supports multiple instances so that it can be included as part of the pipeline for multiple loaders. I believe that we have a scenario outlined below that is not handled by any of the core Webpack features or by MiniCssExtractPlugin.\r\n\r\nWe have a large codebase that includes hundreds of SCSS files written prior to our adoption of CSS modules. Thus, we have two distinct loaders, one for our legacy SCSS and basic CSS files with `modules` disabled and another without.\r\n\r\n### Feature Use Case\r\n\r\nThis is a pared down version of our CSS loader configuration using ExtractTextPlugin\r\n```\r\n{\r\n    // CSS modules\r\n    test: /\\.scss$/,\r\n    exclude: [/_\\w+\\.scss/],\r\n    use: ExtractTextPlugin.extract({\r\n        use: [\r\n            {\r\n                loader: 'css-loader',\r\n                options: {\r\n                    // Enable CSS modules by default on all files\r\n                    modules: true,\r\n                    importLoaders: 1,\r\n                    minimize: isProd,\r\n                },\r\n            },\r\n            {\r\n                loader: 'sass-loader',\r\n                {\r\n                    includePaths: [\r\n                        path.join(options.root, 'src'),\r\n                    ],\r\n                },\r\n            },\r\n        ],\r\n        fallback: 'style-loader',\r\n    }),\r\n},\r\n{\r\n    // Legacy CSS files (no CSS modules)\r\n    test: /_\\w+\\.scss$|\\w+\\.css$/,\r\n    use: ExtractTextPlugin.extract({\r\n        use: [\r\n            {\r\n                loader: 'css-loader',\r\n                options: {\r\n                    // Note that `modules: false` is set here by default\r\n                    importLoaders: 1,\r\n                    minimize: isProd,\r\n                },\r\n            },\r\n            {\r\n                loader: 'sass-loader',\r\n                options: {\r\n                    includePaths: [\r\n                        path.join(options.root, 'src'),\r\n                    ],\r\n                },\r\n            },\r\n        ],\r\n        fallback: 'style-loader',\r\n    }),\r\n},\r\n```"},"comment":{"url":"https://api.github.com/repos/webpack-contrib/mini-css-extract-plugin/issues/comments/513287417","html_url":"https://github.com/webpack-contrib/mini-css-extract-plugin/issues/429#issuecomment-513287417","issue_url":"https://api.github.com/repos/webpack-contrib/mini-css-extract-plugin/issues/429","id":513287417,"node_id":"MDEyOklzc3VlQ29tbWVudDUxMzI4NzQxNw==","user":{"login":"evilebottnawi","id":4567934,"node_id":"MDQ6VXNlcjQ1Njc5MzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4567934?v=4","gravatar_id":"","url":"https://api.github.com/users/evilebottnawi","html_url":"https://github.com/evilebottnawi","followers_url":"https://api.github.com/users/evilebottnawi/followers","following_url":"https://api.github.com/users/evilebottnawi/following{/other_user}","gists_url":"https://api.github.com/users/evilebottnawi/gists{/gist_id}","starred_url":"https://api.github.com/users/evilebottnawi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evilebottnawi/subscriptions","organizations_url":"https://api.github.com/users/evilebottnawi/orgs","repos_url":"https://api.github.com/users/evilebottnawi/repos","events_url":"https://api.github.com/users/evilebottnawi/events{/privacy}","received_events_url":"https://api.github.com/users/evilebottnawi/received_events","type":"User","site_admin":false},"created_at":"2019-07-19T16:12:30Z","updated_at":"2019-07-19T16:12:30Z","author_association":"MEMBER","body":"As i said above use `splitChunk` with `test: /_\\w+\\.css/`"}}
{"actor":{"display_login":"evilebottnawi"}}