I’m rendering some Js on the fly in my project at ./source/assets/javascripts/stuff.js.erb. ./source/assets/javascripts is my JavaScript directory. I’m using sitemap.resources and iterating over the objects contained within to render my Js on the fly. This works fine while using middleman server, but once I run middleman build, sitemap.resources is empty. This only seems to happen when using sitemap.resources from inside the JavaScript directory… I’m using sitemap.resources in several other places around the theme and it works normally during build.
I tried disabling js magnification during build and it didn’t make a difference.