Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Anyone know what could be wrong? It doesn't load files residing in /craft/templates/js that I include with for example {% includeJsFile "/js/file.min.js" %}, only if the js folder is in the public folder.
That should work out of the box – very odd. You might want to turn on devMode and visit the URL to your JS assets directly (e.g. "example.com/js/file.min.js") in your browser, just to see what Craft spits out. Also, check your logs in /craft/storage/runtime/logs for [error] messages. In any case; be advised that keeping JS and/or CSS files in the /templates folder is not best practice – unless you have a very good reason, you should always serve JS & CSS from your public folder.
devMode
and visit the URL to your JS assets directly (e.g. "example.com/js/file.min.js") in your browser, just to see what Craft spits out. Also, check your logs in/craft/storage/runtime/logs
for[error]
messages. In any case; be advised that keeping JS and/or CSS files in the/templates
folder is not best practice – unless you have a very good reason, you should always serve JS & CSS from your public folder.