Reputation: 382
Webpack 2.2.0 is giving me this error when I try to run an npm script:
No configuration file found and no output filename configured via CLI option.
I've made sure that webpack.config.js is in the src folder.
module.exports = {
entry: './src/app.js',
output: {
filename: './dist/app.bundle.js'
}
}
I appreciate any assistance.
Upvotes: 6
Views: 30178
Reputation: 3586
You have 2 solutions:
webpack.config.js
to the root folder instead of ./src
(pointed out by Jared Farrish)--config
attribute with the CLI that points to ./src/webpack.config.js
: webpack --config src/webpack.config.js
Upvotes: 12