0

I have read through this popular answer but my team and I are still confused.

We have a monorepo where one package is shared between others. This package is called "shared-types" (which would usually be used as a dev dep) but it contains enums (which are objects, and therefore should logically be a regular dep).

All the workspaces use this shared package as a dev dep, but despite this, all the enums are imported and used correctly in production. Based on dev dep rules, a production build should not install this shared package, which means these enums should not be available - and yet they are.

I would love to understand why this works!

Ronny Efronny
  • 1,148
  • 9
  • 28

0 Answers0