Commit 729e794
committed
fix(build): declare @strapi/utils as peerDependency — preventive zod/v4 fix
Preventive companion to the magic-link runtime crash fix. Session
Manager did not yet crash at runtime but had the same structural
issue: @strapi/utils was being inlined into dist/server/index.js,
and @strapi/utils now internally does require('zod/v4'). With zod
pinned to ^3.x on the host the import resolves to undefined and
z.string() crashes.
Adding @strapi/utils to peerDependencies tells pack-up to emit
require('@strapi/utils') at runtime instead of copying the library
into the bundle.
Impact:
- dist/server/index.js: 52,009 -> 13,817 lines
- zero require('zod/v4') in bundle
- @strapi/utils loaded at runtime from Strapi host
- lockfile regenerated with npm install --no-workspaces1 parent b165368 commit 729e794
3 files changed
Lines changed: 33 additions & 78 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
0 commit comments