Manifest.json

I’ve read through numerous previous threads re: this topic, but it seems I’m running into a slightly different issue.

After running grunt build on my local development environment, I see the manifest.json created in the assets directory, but for some reason it’s not being picked up my Git?

I realize this is more of a Git question than a Roots question, but any assistance is greatly appreciated.

That’s because the file is Git ignored: https://github.com/roots/roots/blob/master/.gitignore#L9

We do this by default because in general build artefacts/compiled production assets shouldn’t be committed to source control. If you want to, just remove that line above.

1 Like

What is this file for? And why is it only created on grunt build? It was missing after a fresh roots npm install

It keeps track of cache busting strings which are appended to CSS and JS asset filenames.

See here: https://github.com/roots/roots/blob/master/Gruntfile.js#L118

and here: https://github.com/roots/roots/blob/master/lib/scripts.php#L30