Подскажите как с генерировать css из less с помощью webpack. Использую Extract Text Plugin.
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const extractLess = new ExtractTextPlugin('public/stylesheets/style.css');
module.exports = {
entry: './public/javascripts/index.js',
output: {
filename: 'bundle.js'
},
module: {
loaders: [{
test: /\.less$/i,
loader: extractLess.extract(['css-loader', 'less-loader'])
}]
},
plugins: [
extractLess
]
};
Такой вывод в консоль:
Hash: 0bd4f09244f0e8c60354
Version: webpack 3.5.5
Time: 69ms
Asset Size Chunks Chunk Names
bundle.js 2.47 kB 0 [emitted] main
[0] ./public/javascripts/index.js 0 bytes {0} [built]