Laravel ships with a package.json file for npm.
The default package.json
only ships with devDependencies.
If I am not mistaken then:
npm run development
is used to bundle all dependencies with web pack into a single file on local developent, which is then pushed via version-control to production.npm install
is only required on production, whenpackage.json
contains actualdependencies
(and not onlydevDependencies
).
However, I am a bit confused about the npm run production
script. Should I run webpack
in production? Or is this obsolete if I have done this in development and pushed it via VC? I did not find anything in the Deploy docs from Laravel.