Since most issues with require.js build has to do with file structure and relative path reference, I created a repo here: https://github.com/ttback/requirejs-example for easier troubleshoot.
The error is when i run grunt, I will get no such file or directory requirejs-example/src/js/bundle/js/bundle/utils.js
This is due to the wrong baseUrl. I want it to be src/
but I can't set it since it goes to find the dependencies for src/js/bundle/main.js
based on my Gruntfile. So the base is at src/js/bundle
. The current main.js works with the index.html, if I change the relative path to utils.js from .js/bundle/utils.js
to ./utils.js
inside main.js, the app wil break.
Is there any way I can make the grunt-requirejs work with what I have?