{"action":"closed","issue":{"url":"https://api.github.com/repos/webpack-contrib/extract-text-webpack-plugin/issues/773","repository_url":"https://api.github.com/repos/webpack-contrib/extract-text-webpack-plugin","labels_url":"https://api.github.com/repos/webpack-contrib/extract-text-webpack-plugin/issues/773/labels{/name}","comments_url":"https://api.github.com/repos/webpack-contrib/extract-text-webpack-plugin/issues/773/comments","events_url":"https://api.github.com/repos/webpack-contrib/extract-text-webpack-plugin/issues/773/events","html_url":"https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/773","id":312195757,"number":773,"title":"CSS not extracted from generated LESS file","user":{"login":"titiyoyo","id":391012,"avatar_url":"https://avatars0.githubusercontent.com/u/391012?v=4","gravatar_id":"","url":"https://api.github.com/users/titiyoyo","html_url":"https://github.com/titiyoyo","followers_url":"https://api.github.com/users/titiyoyo/followers","following_url":"https://api.github.com/users/titiyoyo/following{/other_user}","gists_url":"https://api.github.com/users/titiyoyo/gists{/gist_id}","starred_url":"https://api.github.com/users/titiyoyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/titiyoyo/subscriptions","organizations_url":"https://api.github.com/users/titiyoyo/orgs","repos_url":"https://api.github.com/users/titiyoyo/repos","events_url":"https://api.github.com/users/titiyoyo/events{/privacy}","received_events_url":"https://api.github.com/users/titiyoyo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-07T10:32:03Z","updated_at":"2018-04-08T13:02:00Z","closed_at":"2018-04-08T13:02:00Z","author_association":"NONE","body":"<!--\r\n1. Check the version of package you are using. If it's not the newest version, update and try again (see changelog while updating!).\r\n2. If the issue is still there, write a minimal project showing the problem and expected output.\r\n3. Link to the project and mention Node version and OS in your report.\r\n\r\n**IMPORTANT! You should use [Stack Overflow](https://stackoverflow.com/) for support related questions.**\r\n-->\r\nI'm trying to generate a CSS file from less-loader using the following config.\r\nI get a js file for the generated  but the CSS file is not generated by ExtractTextPlugin.\r\n\r\nExtractTextPlugin v4.0.0-beta.0\r\nWebpack v4.5.0\r\n\r\nHere's my webpack config\r\n\r\n```\r\n// modules\r\nconst path = require('path');\r\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\r\nconst extractLess = new ExtractTextPlugin({\r\n    filename: \"style.css\",\r\n    disable: process.env.NODE_ENV === \"development\"\r\n});\r\nconst CopyWebpackPlugin = require('copy-webpack-plugin')\r\nconst DotenvPlugin = require('webpack-dotenv-plugin');\r\n\r\nvar BUILD_DIR = path.resolve(__dirname,  './public/dist');\r\nvar APP_DIR = path.resolve(__dirname, './assets');\r\nvar THEME_DIR_REL = '../themes/globo';\r\n\r\nconst config = {\r\n    mode: 'development',\r\n    output: {\r\n        path: BUILD_DIR,\r\n        filename: '[name]'\r\n    },\r\n    entry: {\r\n        'bundle.min.css': [\r\n            // APP_DIR + '/css/forms.css',\r\n            APP_DIR + '/lib/globo/less/style.less'\r\n        ]\r\n    },\r\n    resolve: {\r\n        extensions: ['.ts', '.jsx', '.js', '.css', '.less'],\r\n        alias: {\r\n            'FosRouter': path.resolve('./vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.js'),\r\n            'FosRoutes': path.resolve(BUILD_DIR, 'fos_routes.js')\r\n        },\r\n        modules: [\r\n            'node_modules'\r\n        ]\r\n    },\r\n    module: {\r\n        rules: [\r\n            {\r\n                test: /\\.js|.jsx$/,\r\n                exclude: /node_modules/,\r\n                loader: ['babel-loader']\r\n            },\r\n            {\r\n                test: /\\.(ttf|eot|woff|woff2)$/,\r\n                loader: \"file-loader\",\r\n                options: {\r\n                    name: \"fonts/[name].[ext]\",\r\n                },\r\n            },\r\n            {\r\n                test: /\\.less$/,\r\n                use: extractLess.extract({\r\n                    use: [{\r\n                        loader: \"css-loader\",\r\n                        options: {url: false}\r\n                    }, {\r\n                        loader: \"less-loader\"\r\n                    }],\r\n                    // use style-loader in development\r\n                    fallback: \"style-loader\"\r\n                })\r\n            },\r\n            {\r\n                test: /\\.(jpg|jpeg|png|ico|gif|svg)$/,\r\n                loader: \"file-loader\",\r\n                options: {\r\n                    name: \"img/[name].[ext]\",\r\n                },\r\n            },\r\n            {\r\n                test: /\\.css$/,\r\n                use: ExtractTextPlugin.extract({\r\n                    fallback: \"style-loader\",\r\n                    use: ['css-loader']\r\n                })\r\n            }\r\n        ]\r\n    },\r\n    plugins: [\r\n        new DotenvPlugin({\r\n            sample: './.env.dist',\r\n            path: './.env'\r\n        }),\r\n        new ExtractTextPlugin(THEME_DIR_REL + \"/dist/styles.css\"),\r\n        // new CopyWebpackPlugin([\r\n        //     { from: APP_DIR + '/lib', to: '../themes', toType: 'dir' }\r\n        // ]\r\n        // ,{\r\n        //     context: './public',\r\n        //     ignore: [\r\n        //         '*.less'\r\n        //     ]\r\n        // })\r\n    ]\r\n};\r\n\r\nmodule.exports = config;\r\n```"}}
{"actor":{"display_login":"titiyoyo"}}