Replies: 1 comment 2 replies
-
You should keep runtime dependencies like You can keep things like Vite, ESLint, Biome, and other build time dependencies as devDependencies. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am experimenting with React Router framework for the first time. To avoid confusion for our developers, we just use
devDependencies
for applications because the bundler (Vite, esbuild, your-bundler) handles dependencies.Edit: Note: Right now, we use SPA/client-side only.
However,
react-router build
fails citing no@react-router/node
(which is indevDependencies
).If I move
@react-router/node
to dependencies it works. (Although it uninstalls all of mydevDependencies
, maybe due to a production install command? I am using pnpm.)Does React Router 7 (framework) disallow
devDependencies
?If so, "Why?"
Note: I am open to hearing critiques of "always use
devDependencies
." I am tempted to switch to "always usedependencies
" to keep it simple for our developers. "Your developers should know the difference." is not helpful, but I am open to good material to help explain the difference. I personally prefer the definition of "runtime" and "others" for applications.Beta Was this translation helpful? Give feedback.
All reactions