node -v
): 7.8.0npm -v
): 4.2.0Laravel's default .gitignore
does not contain Mix's build artifacts, such as public/mix-manifest.json
as well as the public/js/app.js
and public/css/app.css
that come configured out-of-the-box. This requires extra work from people that are using laravel-mix (to manually add the files to the .gitignore), and might cause people to accidentally commit them to source control.
public/mix-manifest.json
should be committed.
Why? It's a build artifact.
Sent from my phone.
On Sep 5, 2017 8:01 AM, "Jeffrey Way" notifications@github.com wrote:
public/mix-manifest.json should be committed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/JeffreyWay/laravel-mix/issues/1159#issuecomment-327203650,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFnHbjv20R1tYgRWRzPWARvk3kBCSPIks5sfWJYgaJpZM4PLV9y
.
It's not. Your project can use that file to calculate the proper asset URLs.
Sure, but you shouldn't check it in to source control. Instead, running npm run prod
should be part of the deployment script. 👍
Many devs build production on local then push. 1st time I've seen the issue come up, so likely many using it this way.
Does that mean that some devs commit the combined + minified CSS and JS to source control? Because that's definitely not a best practice, and you'd also be likely to hit many merge conflicts. If not, commiting the laravel-mix.json but not the combined files doesn't make a lot of sense, as the laravel-mix.json is derived purely from the minified assets. Curious to hear the use case here.
It's up to your preference. If you like it, commit mix-manifest.json
to SCM, otherwise just add that file into .gitignore
. We cannot please everyone.
@JeffreyWay sorry for bringing this up. Is there any reason why we should commit mix-manifest.json
to the repo?
I think it really depends on whether or not you're generating assets on deploy @ruchern.
I'm having an issue with this but it's primarily caused by hot reloading, the mix file ends up adding all the hot-updates.js to the mix file. I assume there's no way to stop this happening?
@JeffreyWay
I have a problem same to @peterfox.
How do you think about a lot of *.hot-update.js
?
Is there no way to prevent this?
{
"/js/app.js": "/js/app.js",
"/css/app.css": "/css/app.css",
"/25.04b1b8faa0d85942fbde.hot-update.js": "/25.04b1b8faa0d85942fbde.hot-update.js",
"/25.18d969e484264c9635cc.hot-update.js": "/25.18d969e484264c9635cc.hot-update.js",
"/25.814ba50c22fae1333c64.hot-update.js": "/25.814ba50c22fae1333c64.hot-update.js",
"/25.52594d8d581cea56d211.hot-update.js": "/25.52594d8d581cea56d211.hot-update.js",
"/25.70450c622baa98e398c3.hot-update.js": "/25.70450c622baa98e398c3.hot-update.js",
"/25.d485f94cbfcd8c49bbbb.hot-update.js": "/25.d485f94cbfcd8c49bbbb.hot-update.js",
"/25.5bf0b171ac73ffe3ff6d.hot-update.js": "/25.5bf0b171ac73ffe3ff6d.hot-update.js",
"/25.0116b91aa9ff11fd031d.hot-update.js": "/25.0116b91aa9ff11fd031d.hot-update.js",
"/25.7dc536642273780f5919.hot-update.js": "/25.7dc536642273780f5919.hot-update.js",
"/25.cdbd312d10979412e33b.hot-update.js": "/25.cdbd312d10979412e33b.hot-update.js",
"/25.75657001266391f1955a.hot-update.js": "/25.75657001266391f1955a.hot-update.js",
"/25.894688ecc22f9a7108b4.hot-update.js": "/25.894688ecc22f9a7108b4.hot-update.js",
"/25.276432f56bd461c910e3.hot-update.js": "/25.276432f56bd461c910e3.hot-update.js",
"/25.a925b09d339377aef710.hot-update.js": "/25.a925b09d339377aef710.hot-update.js",
"/25.69e064cee7f497d80b62.hot-update.js": "/25.69e064cee7f497d80b62.hot-update.js",
"/25.bfb218759f72273a4508.hot-update.js": "/25.bfb218759f72273a4508.hot-update.js",
"/25.36e6b47fd93bcac1d9d8.hot-update.js": "/25.36e6b47fd93bcac1d9d8.hot-update.js",
"/25.44a12d521b8fc40fd60c.hot-update.js": "/25.44a12d521b8fc40fd60c.hot-update.js",
"/25.4a2b81cb4f4de7f5314b.hot-update.js": "/25.4a2b81cb4f4de7f5314b.hot-update.js",
"/25.902d3a46717b100fb13d.hot-update.js": "/25.902d3a46717b100fb13d.hot-update.js",
"/25.c3bbe49dcbf59fc00874.hot-update.js": "/25.c3bbe49dcbf59fc00874.hot-update.js",
"/25.cb45459544daacb1a273.hot-update.js": "/25.cb45459544daacb1a273.hot-update.js",
"/25.9dc1e995dd386d6f26b0.hot-update.js": "/25.9dc1e995dd386d6f26b0.hot-update.js",
"/25.6bba9c7bdf8dcf61e4ee.hot-update.js": "/25.6bba9c7bdf8dcf61e4ee.hot-update.js",
"/25.4596d8c4c3771790533e.hot-update.js": "/25.4596d8c4c3771790533e.hot-update.js",
"/25.a0aa8af33507ad28f3d8.hot-update.js": "/25.a0aa8af33507ad28f3d8.hot-update.js",
"/25.771ad58aa423003ae684.hot-update.js": "/25.771ad58aa423003ae684.hot-update.js",
"/25.114454551fa9664f11de.hot-update.js": "/25.114454551fa9664f11de.hot-update.js",
"/25.4e200da307faac71c2ba.hot-update.js": "/25.4e200da307faac71c2ba.hot-update.js",
"/25.874d790aab44bc6296bd.hot-update.js": "/25.874d790aab44bc6296bd.hot-update.js",
"/25.368ba7cc023aedb8ee87.hot-update.js": "/25.368ba7cc023aedb8ee87.hot-update.js",
"/25.573f350aaff7c433717c.hot-update.js": "/25.573f350aaff7c433717c.hot-update.js",
"/25.3f85c475f1af8e04ef7a.hot-update.js": "/25.3f85c475f1af8e04ef7a.hot-update.js",
"/25.dc3fb423f23740615df8.hot-update.js": "/25.dc3fb423f23740615df8.hot-update.js",
"/25.019073aac7451ccc86c2.hot-update.js": "/25.019073aac7451ccc86c2.hot-update.js",
"/25.261ddf847e9e17699e58.hot-update.js": "/25.261ddf847e9e17699e58.hot-update.js",
"/25.34881459283bd02299b0.hot-update.js": "/25.34881459283bd02299b0.hot-update.js",
"/25.4cce9459f21b91d63355.hot-update.js": "/25.4cce9459f21b91d63355.hot-update.js",
"/25.d6295627b83e49efdb3e.hot-update.js": "/25.d6295627b83e49efdb3e.hot-update.js",
"/25.f8aced6b7cc227cf83b5.hot-update.js": "/25.f8aced6b7cc227cf83b5.hot-update.js",
"/25.6dc9277cd6b58fd40720.hot-update.js": "/25.6dc9277cd6b58fd40720.hot-update.js",
"/25.9602bd7dab042f6a1416.hot-update.js": "/25.9602bd7dab042f6a1416.hot-update.js",
"/25.102cde0ca5609162d0ce.hot-update.js": "/25.102cde0ca5609162d0ce.hot-update.js",
"/25.6c8c4ab7e4c3e4efc32d.hot-update.js": "/25.6c8c4ab7e4c3e4efc32d.hot-update.js",
"/25.06fb1a59d2a137d06885.hot-update.js": "/25.06fb1a59d2a137d06885.hot-update.js",
"/25.8f14f449149831fb40e6.hot-update.js": "/25.8f14f449149831fb40e6.hot-update.js",
"/25.953a7a41838e235934d9.hot-update.js": "/25.953a7a41838e235934d9.hot-update.js",
"/25.9d5932e8464aabaa275b.hot-update.js": "/25.9d5932e8464aabaa275b.hot-update.js",
"/25.8d7f3b972febc5239672.hot-update.js": "/25.8d7f3b972febc5239672.hot-update.js",
"/25.01d7f7af6d90e7781f3a.hot-update.js": "/25.01d7f7af6d90e7781f3a.hot-update.js",
"/25.63327fe51a1c5fc8d39d.hot-update.js": "/25.63327fe51a1c5fc8d39d.hot-update.js",
"/25.5395b62152d48c049e53.hot-update.js": "/25.5395b62152d48c049e53.hot-update.js",
"/25.764e2d87bfbd61434fd3.hot-update.js": "/25.764e2d87bfbd61434fd3.hot-update.js",
"/25.5d5e9ed86f3f356dc12d.hot-update.js": "/25.5d5e9ed86f3f356dc12d.hot-update.js",
"/25.75d34ebfd3083b7b70cb.hot-update.js": "/25.75d34ebfd3083b7b70cb.hot-update.js",
"/25.2e496a895f947871e578.hot-update.js": "/25.2e496a895f947871e578.hot-update.js",
"/25.3571125250be06ca621d.hot-update.js": "/25.3571125250be06ca621d.hot-update.js",
"/25.afa31aecae18a479240d.hot-update.js": "/25.afa31aecae18a479240d.hot-update.js",
"/25.01685a985772c75ef586.hot-update.js": "/25.01685a985772c75ef586.hot-update.js",
"/25.c3a85a7cde1011a9b3a0.hot-update.js": "/25.c3a85a7cde1011a9b3a0.hot-update.js",
"/25.9f14bd29ad9696ee8bfb.hot-update.js": "/25.9f14bd29ad9696ee8bfb.hot-update.js",
"/25.d09f04e7f43785814e9d.hot-update.js": "/25.d09f04e7f43785814e9d.hot-update.js",
"/25.4b9c9f4d398b2ac3168d.hot-update.js": "/25.4b9c9f4d398b2ac3168d.hot-update.js",
"/25.1f4478b5205421eca8a2.hot-update.js": "/25.1f4478b5205421eca8a2.hot-update.js",
"/25.151ed278de820552260a.hot-update.js": "/25.151ed278de820552260a.hot-update.js",
"/25.23fcd707c232f916b1fb.hot-update.js": "/25.23fcd707c232f916b1fb.hot-update.js"
}
Most helpful comment
Sure, but you shouldn't check it in to source control. Instead, running
npm run prod
should be part of the deployment script. 👍