javascriptreactjswebpackwebpack.config.js

How webpack.config.js work in react project?


I saw react + express project code here, start project just using this codes.

But I can't find how to read/execute webpack.config.js command. Who read this code? and how it works?


Solution

  • Webpack reads webpack.config.js by default, unless you explicitly tell it to read another config file by using the --config argument, e.g.:

    webpack --config another.config.js
    

    In your case, this command reads the webpack.config.js:

    ./node_modules/.bin/webpack --progress