I need to create application with Express.js, jade and less and want to assemble application in bundles with webpack. Whole internet is full of articles about setup webpack for react but no one about setting up it for usual express application with modular javascript.
There is also no one article about how to make common.css from .less files
Help me please!
https://github.com/webpack/jade-loader
require("jade!./template.jade");
// => uses the "jade-loader" (that is installed from npm to "node_modules")
// to transform the file "template.jade"
require("!style!css!less!bootstrap/less/bootstrap.less");
// => the file "bootstrap.less" in the folder "less" in the "bootstrap"
// module (that is installed from github to "node_modules") is
// transformed by the "less-loader". The result is transformed by the
// "css-loader" and then by the "style-loader".
separate loaders with !
check out the configuration API in the webpack docs for examples on how to set up the bundling process. It's just a matter of defining your entry points and your destination.
If you're looking for auto-refreshing look at the webpack dev server API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With