Commit c762309
committed
fix(webapp): make prop-types a production dependency
The server bundle imports prop-types directly, so it has to be present in a
production install. It was declared only as a devDependency, so `pnpm install
--prod` leaves it out and the built server fails to boot with
ERR_MODULE_NOT_FOUND on startup.
Nothing in the webapp's own code imports it. It arrives through recharts, whose
react-smooth dependency declares propTypes on its components. That used to be
invisible here: while recharts was resolved at runtime, the import was satisfied
inside recharts' own dependency tree. #4486 added recharts to `ssr.noExternal`
to fix a hydration mismatch, which inlines react-smooth into the server bundle
and moves its prop-types import into the webapp's own resolution scope, where the
package was not available in production.
Verified by pruning the workspace the way docker/Dockerfile does and running
`pnpm install --prod` against it: importing prop-types from the webapp fails
with ERR_MODULE_NOT_FOUND before this change and resolves after. It is the only
devDependency-only bare import in the server bundle, out of 169 specifiers.1 parent 8f9db53 commit c762309
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
260 | 261 | | |
261 | 262 | | |
262 | 263 | | |
263 | | - | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments