Impact of library on Production
Answered
Asian black bear posted this in #help-forum
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
@Asian black bear 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 (`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"`
* 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
@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
Asian black bearOP
ok, 1st one will have no difference ?
@Asian black bear ok, 1st one will have no difference ?
No difference between dependencies and devDependencies for the dependencies of a Next.js application
Asian black bearOP
ok