How to configure webpack for express.js application, not respond to the application?

I need to create an application with Express.js, jade and less and want to build the application in packages using webpack. The entire Internet is full of articles on setting up webpack to respond, but no one is setting it up for a regular express application with modular javascript.

There is also one article on how to make common.css from .less files

Help me please!

+4
source share
1 answer
  • https://github.com/webpack/less-loader
  • 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 !

API webpack , . .

API - dev.

0

Source: https://habr.com/ru/post/1608176/


All Articles