How to specify webpack-dev-server webpack.config.js file location
Just came across this issue. As spacek33z said, --config
is correct. I couldn't find this in the webpack docs or the webpack-dev-server docs, so I found myself at this question.
e.g.
webpack-dev-server --config demo/webpack.config.js
For newbies like me:
Mention the config path in package.json similar to below:
{
"name": "abc",
"version": "0.0.1",
"description": "description",
"main": "index.js",
"scripts": {
"dev": "webpack-dev-server --config ./client/webpack.config.js",
"build": "webpack --config ./client/webpack.config.js"
}
}