2

Since Webpack 4 supports tree-shaking, does it still matter if we put dependencies in dependencies or in devDependencies in the package.json file?

If tree shaking works as it is meant to, then all lint, flow, testing and tooling packages would get shaken off. Correct?

Adam
  • 3,415
  • 4
  • 30
  • 49

1 Answers1

1

Yes, it will remove unneeded code when creating bundle file. But if you want to reuse your code, or publish to npm, you should care about dependencies and devDependencies.

More info here

Cuong Vu
  • 3,423
  • 14
  • 16