Sorry, but I don't think that's part of the 12-factor app. The 12-factor guideline is that apps shouldn't be dependent on implicit dependencies (I dunno, like having imagemagic installed on the system), but instead should use a dependency management system (like NPM or Composer). So I don't think the statement "shared code is an anti-pattern" is true. But I could be wrong, haven't read the 12 factors in a while...