Here's the Gruntfile config and the produced config.js file created by running grunt build related to requirejs: https://gist.github.com/rbudiharso/a650e581d4e4443e7624#file-config-js-L7
Note that in the produced config.js file, templates is wrapped in AMD define call, also the file is wrapped in strict mode, the problem is that this in this line:
this["JST"] = this["JST"] || {};
is undefined so this line is producing error
Uncaught TypeError: Cannot read property 'JST' of undefined,
The way I fixed it is by editing the templates defined call so that this is replaced with an object like in edited-config.js file.
I don't know if there's anything wrong with my gruntfile configuration or grunt-contrib-jst is incompatible when used with requirejs and strict mode.