2

I have deployed my app which is built with webpack-dev-server through AWS ec2-instance. It says I should change it to production. What is the difference between deploying in development and production? If the development server compiles every assets and components into a bundle too, what is the benefit of using production?

Additional question: When setting a start script to start webpack-dev-server, I saw people writing it as

  "scripts": {
      "start": "webpack-dev-server --entry ./src/js/app.js --output-filename ./dist/bundle.js"
  }

from it, what is the reason for prepending --output to -filename? I tried writing without it and apparently it works fine. I looked up the documentation, but couldn't find what I was looking for. could someone tell me what that is if one knows? Thank you.

Jay Jeong
  • 892
  • 2
  • 11
  • 24

1 Answers1

1

Optimizations and security are the biggest factors.

pfcodes
  • 1,055
  • 2
  • 9
  • 15