Impact of library on Production
Answered
Asian black bear posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Asian black bearOP
How to decide the impact of size of a library on production of a web app ? (using next js 13.5.2)
- will the production build will be reduced if it's in dev-dependency and not in dependencies ?
- if it's in dependencies but no where in the app it's importd (
- difference between
- say i've a library
- will the production build will be reduced if it's in dev-dependency and not in dependencies ?
- if it's in dependencies but no where in the app it's importd (
import {foo} from bar;
), will the production build will include the library ?- difference between
npm i foo
vs npm install foo --save
, how it impact size of production ?- say i've a library
foo
in depnedency list and it's used in "/amigo"
route/file , will the web app will load the library before i visit "/amigo"
route of only load the library after i visit "/amigo"
Answered by joulev
* no difference
* no
* no difference
* only /amigo bundle js files have the foo library, so it won’t impact the load time of other routes
* no
* no difference
* only /amigo bundle js files have the foo library, so it won’t impact the load time of other routes
4 Replies
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
* no difference
* no
* no difference
* only /amigo bundle js files have the foo library, so it won’t impact the load time of other routes
* no
* no difference
* only /amigo bundle js files have the foo library, so it won’t impact the load time of other routes
Answer
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Asian black bearOP
ok, 1st one will have no difference ?
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/f386ac21405ce3442e0f3598223e1cb3.webp?size=256)
joulev
No difference between dependencies and devDependencies for the dependencies of a Next.js application
![Avatar](https://cdn.discordapp.com/embed/avatars/5.png)
Asian black bearOP
ok