Reputation: 239
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?
Upvotes: 2
Views: 699
Reputation: 687
You don't execute webpack.config.js. It is a configuration file that webpack will refer to and use when webpack is run. See this page for more info.
The build and start scripts in the package.json file for the project you linked to both run webpack. Webpack will then create a bundle.js file according to the information in webpack.config.js.
Upvotes: 2
Reputation: 3107
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
Upvotes: 3