1

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.

1

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.