0

I used npx webpack-cli init to create my config file. I then decided to moved the created config files into a config/ folder. Now when I run serve it tells me the mode hasnt been set. I imagine I need to update some setting but havent been able to find the location.

Where can I update this?

Edit: Or should I just run this command in the desired directory?

Newb 4 You BB
  • 1,205
  • 1
  • 11
  • 30

1 Answers1

0

By default webpack-cli will try to find the webpack configuration file under you project root, since you've moved it to config folder, you would have to specify the path to it, e.g.:

npx webpack serve --config config/webpack.config.js
Sam Chen
  • 1,933
  • 16
  • 24