I am new to webpack. Want to know how do we lessify or convert less files into css using webpack, like we use cssify plugin in gulp.
2 Answers
You use webpack's less-loader (along with the css-loader and probably the style-loader) and require() the less file the same way you would a javascript module. See Using Loaders for more info on how loaders work in webpack.
Comments
You could take a look at Extract-Text-Webpack-Plugin. Basically, webpack is a JS module bundler so (as far as I know) there's no way to compile less directly into css. Instead, you can 'load' less file into js using something like less-loader and other loaders, and extract text to make separate css file using plugin.